# Copyright 2024 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/chrome_build.gni")
import("//build/config/chromeos/ui_mode.gni")
assert(is_chromeos_ash)
static_library("search") {
sources = [
"app_discovery_metrics_manager.cc",
"app_discovery_metrics_manager.h",
"app_result.cc",
"app_result.h",
"app_search_data_source.cc",
"app_search_data_source.h",
"app_search_provider.cc",
"app_search_provider.h",
"app_service_app_result.cc",
"app_service_app_result.h",
"app_zero_state_provider.cc",
"app_zero_state_provider.h",
"assistant_text_search_provider.cc",
"assistant_text_search_provider.h",
"burn_in_controller.cc",
"burn_in_controller.h",
"chrome_search_result.cc",
"chrome_search_result.h",
"desks_admin_template_provider.cc",
"desks_admin_template_provider.h",
"federated_metrics_manager.cc",
"federated_metrics_manager.h",
"help_app_provider.cc",
"help_app_provider.h",
"help_app_zero_state_provider.cc",
"help_app_zero_state_provider.h",
"keyboard_shortcut_provider.cc",
"keyboard_shortcut_provider.h",
"keyboard_shortcut_result.cc",
"keyboard_shortcut_result.h",
"os_settings_provider.cc",
"os_settings_provider.h",
"personalization_provider.cc",
"personalization_provider.h",
"scoring.cc",
"scoring.h",
"search_controller.cc",
"search_controller.h",
"search_controller_factory.cc",
"search_controller_factory.h",
"search_engine.cc",
"search_engine.h",
"search_features.cc",
"search_features.h",
"search_file_scanner.cc",
"search_file_scanner.h",
"search_metrics_manager.cc",
"search_metrics_manager.h",
"search_metrics_util.cc",
"search_metrics_util.h",
"search_provider.cc",
"search_provider.h",
"search_session_metrics_manager.cc",
"search_session_metrics_manager.h",
"types.cc",
"types.h",
]
public_deps = [
"//ash",
"//ash/public/cpp",
"//ash/public/mojom:accelerator_info",
"//ash/webui/help_app_ui/search:mojo_bindings",
"//ash/webui/personalization_app/search:mojo_bindings",
"//ash/webui/shortcut_customization_ui/backend",
"//ash/webui/shortcut_customization_ui/backend/search:mojo_bindings",
"//base",
"//chrome/browser:browser_public_dependencies",
"//chrome/browser/ash/app_list",
"//chrome/browser/ash/app_list/search/ranking",
]
deps = [
"//ash/assistant/util",
"//ash/webui/help_app_ui",
"//ash/webui/personalization_app",
"//ash/webui/shortcut_customization_ui",
"//chrome/browser/ash/app_list/arc",
"//chrome/browser/ash/app_list/search/util",
"//chrome/browser/ash/app_list/vector_icons",
"//chrome/browser/ash/crosapi:browser_util",
"//chrome/browser/ash/drive",
"//chrome/browser/ash/release_notes",
"//chrome/browser/chromeos/launcher_search:search_util",
"//chrome/browser/metrics/structured:features",
"//chrome/browser/profiles:profile",
"//chrome/browser/sync:factories",
"//chrome/browser/ui/webui/ash/settings/search",
"//chrome/browser/ui/webui/ash/settings/search/mojom",
"//chrome/browser/web_applications",
"//chrome/common:constants",
"//chromeos/ash/components/string_matching",
"//chromeos/ash/services/assistant/public/cpp",
"//chromeos/ash/services/federated/public/cpp",
"//chromeos/ash/services/federated/public/mojom",
"//chromeos/components/libsegmentation:buildflags",
"//chromeos/crosapi/mojom",
"//chromeos/strings:strings_grit",
"//components/drive",
"//components/feature_engagement/public",
"//components/metrics/structured:structured_events",
"//components/omnibox/browser",
"//components/services/app_service",
"//components/session_manager/core",
"//content/public/browser",
"//extensions/common",
"//mojo/public/cpp/bindings",
"//ui/base",
"//ui/chromeos/styles:cros_tokens_color_mappings_generator",
"//ui/events/ash",
"//url",
# TODO(b/354633817): Use targets having headers included from
# chrome/browser/ash/app_list/search/os_settings_provider.cc.
"//ash/webui/eche_app_ui",
"//chrome/browser/ui/webui/ash/settings/pages/device/display_settings:mojom",
"//chrome/browser/ui/webui/ash/settings/pages/device/input_device_settings:mojom",
]
if (is_chrome_branded) {
deps += [ "//chromeos/ash/resources/internal/strings:strings" ]
}
allow_circular_includes_from = [
"//chrome/browser/ash/app_list",
"//chrome/browser/ash/app_list/arc",
"//chrome/browser/ash/app_list/search/ranking",
"//chrome/browser/ash/app_list/search/util",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"app_discovery_metrics_manager_unittest.cc",
"app_search_provider_unittest.cc",
"app_zero_state_provider_unittest.cc",
"assistant_text_search_provider_unittest.cc",
"chrome_search_result_unittest.cc",
"desks_admin_template_provider_unittest.cc",
"federated_metrics_manager_unittest.cc",
"help_app_provider_unittest.cc",
"help_app_zero_state_provider_unittest.cc",
"keyboard_shortcut_provider_unittest.cc",
"keyboard_shortcut_result_unittest.cc",
"os_settings_provider_unittest.cc",
"personalization_provider_unittest.cc",
"search_controller_unittest.cc",
"search_engine_unittest.cc",
"search_file_scanner_unittest.cc",
"search_metrics_manager_unittest.cc",
"search_session_metrics_manager_unittest.cc",
]
deps = [
":search",
":test_support",
"//ash",
"//ash/components/arc:arc_test_support",
"//ash/components/arc/mojom",
"//ash/constants",
"//ash/public/cpp",
"//ash/public/cpp/assistant/test_support",
"//ash/public/mojom:accelerator_info",
"//ash/webui/help_app_ui",
"//ash/webui/personalization_app",
"//ash/webui/shortcut_customization_ui/backend",
"//ash/webui/shortcut_customization_ui/backend/search:mojo_bindings",
"//base",
"//base:i18n",
"//base/test:test_support",
"//chrome/app:generated_resources",
"//chrome/browser",
"//chrome/browser:browser_process",
"//chrome/browser/apps/app_service",
"//chrome/browser/ash/app_list:test_support",
"//chrome/browser/ash/app_list/arc:test_support",
"//chrome/browser/ash/app_list/search/common",
"//chrome/browser/ash/app_list/search/ranking",
"//chrome/browser/ash/app_list/search/test:test_support",
"//chrome/browser/ash/app_list/test:test_support",
"//chrome/browser/ash/crostini:test_support",
"//chrome/browser/extensions",
"//chrome/browser/profiles:profile",
"//chrome/browser/sync:factories",
"//chrome/browser/ui",
"//chrome/browser/ui:test_support",
"//chrome/browser/ui/webui/ash/settings/search",
"//chrome/browser/ui/webui/ash/settings/test_support",
"//chrome/browser/web_applications",
"//chrome/browser/web_applications:web_applications_test_support",
"//chrome/common:constants",
"//chrome/test:test_support",
"//chrome/test:test_support_unit",
"//chromeos/ash/components/dbus/chunneld",
"//chromeos/ash/components/dbus/cicerone",
"//chromeos/ash/components/dbus/concierge",
"//chromeos/ash/components/dbus/federated",
"//chromeos/ash/components/dbus/seneschal",
"//chromeos/ash/components/string_matching",
"//chromeos/ash/services/federated/public/cpp:test_support",
"//chromeos/strings",
"//components/crx_file",
"//components/feature_engagement/public",
"//components/metrics/structured:common",
"//components/metrics/structured:events",
"//components/metrics/structured:gen_structured_events_cpp",
"//components/metrics/structured:structured_metrics_features",
"//components/metrics/structured:test_support",
"//components/prefs",
"//components/services/app_service/public/cpp:app_types",
"//components/services/app_service/public/cpp:test_support",
"//components/session_manager/core",
"//components/sync:test_support",
"//components/sync/model",
"//components/sync_preferences:test_support",
"//content/test:test_support",
"//extensions:test_support",
"//extensions/common:mojom",
"//mojo/core/embedder",
"//testing/gmock",
"//testing/gtest",
"//ui/base",
"//ui/display:test_support",
"//ui/events:event_constants",
"//url",
]
}
source_set("browser_tests") {
testonly = true
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
sources = [ "help_app_search_browsertest.cc" ]
deps = [
"//ash:test_support",
"//ash/constants",
"//ash/public/cpp",
"//ash/webui/help_app_ui",
"//ash/webui/help_app_ui/search:mojo_bindings",
"//base",
"//chrome/browser",
"//chrome/browser/apps/app_service",
"//chrome/browser/apps/app_service:constants",
"//chrome/browser/ash/app_list/search/test:browser_test_support",
"//chrome/browser/ash/app_list/search/test:test_support",
"//chrome/browser/ash/system_web_apps",
"//chrome/browser/ui",
"//chrome/browser/ui/ash/system_web_apps",
"//chrome/browser/web_applications",
"//chrome/browser/web_applications:web_applications_test_support",
"//chrome/common:constants",
"//chromeos/strings",
"//components/webapps/common",
]
}
static_library("test_support") {
testonly = true
sources = [
"app_search_provider_test_base.cc",
"app_search_provider_test_base.h",
]
public_deps = [
"//base",
"//base/test:test_support",
"//chrome/browser/ash/app_list:test_support",
"//chrome/browser/ash/app_list/arc:test_support",
"//chrome/browser/ui",
"//extensions/common:mojom",
]
deps = [
":search",
"//ash/components/arc:arc_test_support",
"//ash/components/arc/mojom",
"//chrome/browser/ash/app_list/search/test:test_support",
"//chrome/browser/ash/app_list/test:test_support",
"//chrome/browser/extensions",
"//chrome/test:test_support",
"//components/sync/model",
"//extensions:test_support",
"//testing/gtest",
]
}