# Copyright 2018 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, "Non-ChromeOS builds cannot depend on //ash")
mojom("mojom") {
sources = [ "device_sync.mojom" ]
public_deps = [
"//chromeos/ash/components/multidevice/mojom",
"//mojo/public/mojom/base",
]
webui_module_path =
"chrome://resources/mojo/chromeos/ash/services/device_sync/public/mojom"
# Used by ash/webui/common/resources/multidevice_setup, which is still using
# JS + Closure.
generate_webui_js_bindings = true
cpp_typemaps = [
{
types = [
{
mojom = "ash.device_sync.mojom.ConnectivityStatus"
cpp = "::cryptauthv2::ConnectivityStatus"
},
{
mojom = "ash.device_sync.mojom.FeatureStatusChange"
cpp = "::ash::device_sync::FeatureStatusChange"
},
{
mojom = "ash.device_sync.mojom.CryptAuthService"
cpp = "::cryptauthv2::TargetService"
},
{
mojom = "ash.device_sync.mojom.GroupPrivateKeyStatus"
cpp = "::ash::device_sync::GroupPrivateKeyStatus"
},
{
mojom = "ash.device_sync.mojom.BetterTogetherMetadataStatus"
cpp = "::ash::device_sync::BetterTogetherMetadataStatus"
},
]
traits_headers = [ "device_sync_mojom_traits.h" ]
traits_sources = [ "device_sync_mojom_traits.cc" ]
traits_public_deps = [
"//chromeos/ash/services/device_sync:feature_status_change",
"//chromeos/ash/services/device_sync:group_private_key_and_better_together_metadata_status",
"//chromeos/ash/services/device_sync/proto",
]
},
]
}
source_set("unit_tests") {
testonly = true
sources = [ "device_sync_mojom_traits_unittest.cc" ]
deps = [
":mojom",
"//base",
"//base/test:test_support",
"//chromeos/ash/services/device_sync:feature_status_change",
"//chromeos/ash/services/device_sync/proto",
"//mojo/public/cpp/test_support:test_utils",
"//testing/gtest",
]
}