chromium/chromeos/ash/services/federated/public/cpp/BUILD.gn

# Copyright 2021 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")

assert(is_chromeos_ash, "Non-ChromeOS builds cannot depend on //chromeos/ash")

component("cpp") {
  output_name = "federated_public_cpp"
  sources = [
    "federated_example_util.cc",
    "federated_example_util.h",
    "service_connection.cc",
    "service_connection.h",
  ]
  defines = [ "IS_CHROMEOS_FEDERATED_IMPL" ]
  deps = [
    "//base",
    "//chromeos/ash/components/dbus/federated",
    "//chromeos/ash/services/federated/public/mojom",
  ]
}

source_set("test_support") {
  testonly = true
  sources = [
    "fake_service_connection.cc",
    "fake_service_connection.h",
  ]
  deps = [
    ":cpp",
    "//base",
    "//chromeos/ash/services/federated/public/mojom",
    "//mojo/public/cpp/bindings",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [ "service_connection_unittest.cc" ]
  deps = [
    ":cpp",
    ":test_support",
    "//base/test:test_support",
    "//chromeos/ash/components/dbus/federated",
    "//chromeos/ash/services/federated/public/mojom",
    "//mojo/core/embedder",
    "//mojo/public/cpp/bindings",
    "//testing/gtest",
  ]
}