chromium/chrome/browser/screen_ai/BUILD.gn

# Copyright 2023 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/ui.gni")

if (is_chromeos_ash) {
  source_set("screen_ai_dlc_installer") {
    sources = [
      "screen_ai_dlc_installer.cc",
      "screen_ai_dlc_installer.h",
    ]

    deps = [
      ":screen_ai_install_state",
      "//chromeos/ash/components/dbus/dlcservice",
      "//chromeos/ash/components/dbus/dlcservice:dlcservice_proto",
      "//services/screen_ai/public/cpp:utilities",
    ]

    configs += [ "//build/config/compiler:wexit_time_destructors" ]
  }

  source_set("unit_tests") {
    testonly = true
    sources = [ "screen_ai_dlc_installer_unittest.cc" ]
    deps = [
      ":screen_ai_dlc_installer",
      "//base/test:test_support",
      "//chrome/browser/screen_ai:screen_ai_install_state",
      "//chromeos/ash/components/dbus/dlcservice",
      "//chromeos/ash/components/dbus/dlcservice:dlcservice_proto",
      "//testing/gmock",
      "//testing/gtest",
    ]
  }
}

source_set("screen_ai_install_state") {
  sources = [
    "screen_ai_install_state.cc",
    "screen_ai_install_state.h",
  ]

  deps = [
    ":prefs",
    "//base",
    "//chrome/browser:browser_process",
    "//components/prefs",
    "//content/public/browser",
    "//services/screen_ai/public/cpp:utilities",
    "//ui/accessibility:ax_base",
  ]

  configs += [ "//build/config/compiler:wexit_time_destructors" ]
}

source_set("screen_ai_service_router_factory") {
  sources = [
    "screen_ai_service_router.cc",
    "screen_ai_service_router.h",
    "screen_ai_service_router_factory.cc",
    "screen_ai_service_router_factory.h",
  ]

  deps = [
    ":screen_ai_install_state",
    "//chrome/browser/profiles:profile",
    "//components/keyed_service/core",
    "//content/public/browser",
    "//services/screen_ai/public/cpp:utilities",
    "//services/screen_ai/public/mojom:factory",
    "//services/screen_ai/public/mojom:mojom",
  ]

  configs += [ "//build/config/compiler:wexit_time_destructors" ]
}

source_set("prefs") {
  sources = [
    "pref_names.cc",
    "pref_names.h",
  ]

  deps = [ "//components/prefs" ]

  configs += [ "//build/config/compiler:wexit_time_destructors" ]
}