chromium/chromeos/ash/components/dbus/lorgnette_manager/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("//third_party/protobuf/proto_library.gni")

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

component("lorgnette_manager") {
  defines = [ "IS_LORGNETTE_MANAGER_IMPL" ]

  public_deps = [ ":lorgnette_proto" ]

  deps = [
    "//ash/constants",
    "//base",
    "//chromeos/dbus/common",
    "//components/device_event_log",
    "//dbus",
  ]

  sources = [
    "fake_lorgnette_manager_client.cc",
    "fake_lorgnette_manager_client.h",
    "lorgnette_manager_client.cc",
    "lorgnette_manager_client.h",
  ]
}

source_set("unit_tests") {
  testonly = true
  public_deps = [ ":lorgnette_manager" ]
  deps = [
    ":lorgnette_proto",
    "//ash/constants",
    "//base",
    "//base/test:test_support",
    "//dbus:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]
  sources = [ "lorgnette_manager_client_unittest.cc" ]
}

proto_library("lorgnette_proto") {
  sources =
      [ "//third_party/cros_system_api/dbus/lorgnette/lorgnette_service.proto" ]

  proto_out_dir = "chromeos/ash/components/dbus/lorgnette"
}