chromium/chromeos/ash/services/nearby/public/mojom/BUILD.gn

# Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/chromeos/ui_mode.gni")
import("//mojo/public/tools/bindings/mojom.gni")

assert(is_chromeos_ash)

mojom("nearby_share_settings") {
  sources = [
    "nearby_share_settings.mojom",
    "nearby_share_target_types.mojom",
  ]

  public_deps = [
    "//mojo/public/mojom/base",
    "//url/mojom:url_mojom_gurl",
  ]

  webui_module_path =
      "chrome://resources/mojo/chromeos/ash/services/nearby/public/mojom"
}

mojom("mojom") {
  sources = [
    "firewall_hole.mojom",
    "mdns.mojom",
    "nearby_connections.mojom",
    "nearby_connections_types.mojom",
    "nearby_decoder.mojom",
    "nearby_decoder_types.mojom",
    "nearby_presence.mojom",
    "nearby_presence_credential_storage.mojom",
    "quick_start_decoder.mojom",
    "quick_start_decoder_types.mojom",
    "sharing.mojom",
    "tcp_server_socket_port.mojom",
    "tcp_socket_factory.mojom",
    "webrtc.mojom",
    "webrtc_signaling_messenger.mojom",
  ]

  public_deps = [
    ":nearby_share_settings",
    "//chromeos/ash/services/wifi_direct/public/mojom",
    "//chromeos/services/network_config/public/mojom",
    "//device/bluetooth/public/mojom:deprecated_experimental_interfaces",
    "//mojo/public/mojom/base",
    "//sandbox/policy/mojom",
    "//services/network/public/mojom",
    "//url/mojom:url_mojom_gurl",
  ]

  enable_js_fuzzing = false

  cpp_only = true

  cpp_typemaps = [
    {
      types = [
        {
          mojom = "nearby.connections.mojom.LogSeverity"
          cpp = "::nearby::api::LogMessage::Severity"
        },
      ]
      traits_headers = [ "nearby_connections_mojom_traits.h" ]
      traits_sources = [ "nearby_connections_mojom_traits.cc" ]
      traits_deps = [ "//third_party/nearby:platform_api_types" ]
    },
    {
      types = [
        {
          mojom = "sharing.mojom.TcpServerSocketPort"
          cpp = "::ash::nearby::TcpServerSocketPort"
        },
      ]
      traits_headers = [ "tcp_server_socket_port_mojom_traits.h" ]
      traits_sources = [ "tcp_server_socket_port_mojom_traits.cc" ]
      traits_deps =
          [ "//chromeos/ash/services/nearby/public/cpp:tcp_server_socket_port" ]
    },
  ]
}