blob: a0ba66ece2e6ad39bfca3d71dfd78048a6cfcc16 [file] [log] [blame] [edit]
# 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")
import("//services/screen_ai/buildflags/features.gni")
assert(enable_screen_ai_service)
if (is_chromeos) {
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("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 = [
"resource_monitor.cc",
"resource_monitor.h",
"screen_ai_service_handler_base.cc",
"screen_ai_service_handler_base.h",
"screen_ai_service_handler_main_content_extraction.cc",
"screen_ai_service_handler_main_content_extraction.h",
"screen_ai_service_handler_ocr.cc",
"screen_ai_service_handler_ocr.h",
"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",
"//components/performance_manager",
"//content/public/browser",
"//services/screen_ai/public/cpp:utilities",
"//services/screen_ai/public/mojom",
"//services/screen_ai/public/mojom:factory",
]
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" ]
}
source_set("unit_tests") {
testonly = true
sources = [ "screen_ai_service_handler_unittest.cc" ]
deps = [
":screen_ai_service_router_factory",
"//base/test:test_support",
"//testing/gtest",
]
if (is_chromeos) {
sources += [ "screen_ai_dlc_installer_unittest.cc" ]
deps += [
":screen_ai_dlc_installer",
"//chrome/browser/screen_ai:screen_ai_install_state",
"//chromeos/ash/components/dbus/dlcservice",
"//chromeos/ash/components/dbus/dlcservice:dlcservice_proto",
"//testing/gmock",
]
}
}