chromium/chrome/browser/ash/system_web_apps/apps/personalization_app/BUILD.gn

# 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/chromeos/ui_mode.gni")

assert(is_chromeos_ash)

static_library("personalization_app") {
  sources = [
    "ambient_video_albums.cc",
    "ambient_video_albums.h",
    "enterprise_policy_delegate_impl.cc",
    "enterprise_policy_delegate_impl.h",
    "keyboard_backlight_color_metrics_provider.cc",
    "keyboard_backlight_color_metrics_provider.h",
    "personalization_app_ambient_provider_impl.cc",
    "personalization_app_ambient_provider_impl.h",
    "personalization_app_keyboard_backlight_provider_impl.cc",
    "personalization_app_keyboard_backlight_provider_impl.h",
    "personalization_app_manager.cc",
    "personalization_app_manager.h",
    "personalization_app_manager_factory.cc",
    "personalization_app_manager_factory.h",
    "personalization_app_metrics.cc",
    "personalization_app_metrics.h",
    "personalization_app_sea_pen_provider_base.cc",
    "personalization_app_sea_pen_provider_base.h",
    "personalization_app_sea_pen_provider_impl.cc",
    "personalization_app_sea_pen_provider_impl.h",
    "personalization_app_theme_metrics_provider.cc",
    "personalization_app_theme_metrics_provider.h",
    "personalization_app_theme_provider_impl.cc",
    "personalization_app_theme_provider_impl.h",
    "personalization_app_user_provider_impl.cc",
    "personalization_app_user_provider_impl.h",
    "personalization_app_utils.cc",
    "personalization_app_utils.h",
    "personalization_app_wallpaper_provider_impl.cc",
    "personalization_app_wallpaper_provider_impl.h",
    "personalization_system_app_delegate.cc",
    "personalization_system_app_delegate.h",
    "wallpaper_metrics_provider.cc",
    "wallpaper_metrics_provider.h",
  ]

  public_deps = [
    "//ash",
    "//ash/constants",
    "//ash/public/cpp",
    "//ash/style/mojom:color_scheme_shared",
    "//ash/style/mojom:color_scheme_shared_cpp_sources",
    "//ash/webui/common:sea_pen",
    "//ash/webui/common/mojom:sea_pen",
    "//ash/webui/personalization_app",
    "//ash/webui/personalization_app/mojom",
    "//ash/webui/personalization_app/mojom:mojom_shared",
    "//ash/webui/personalization_app/mojom:mojom_shared_cpp_sources",
    "//base",
    "//chrome/browser:browser_public_dependencies",
    "//chrome/browser/ash/hats",
    "//chrome/browser/ash/system_web_apps/types",
    "//chrome/browser/ash/wallpaper_handlers",
    "//chrome/browser/profiles:profile",
    "//chromeos/ash/components/camera_presence_notifier",
    "//chromeos/ash/components/settings",
    "//components/account_id",
    "//components/keyed_service/core",
    "//components/language/core/common",
    "//components/manta",
    "//components/manta/proto",
    "//components/metrics",
    "//components/prefs",
    "//components/user_manager",
    "//content/public/browser",
    "//mojo/public/cpp/base",
    "//mojo/public/cpp/bindings",
    "//net",
    "//services/data_decoder/public/cpp",
    "//skia",
    "//ui/color",
    "//ui/gfx",
    "//ui/gfx/geometry",
    "//url",
  ]

  deps = [
    "//ash/webui/personalization_app/proto",
    "//ash/webui/personalization_app/resources",
    "//base:i18n",
    "//chrome/browser:browser_process",
    "//chrome/browser/ash/app_list/search",
    "//chrome/browser/ash/login/demo_mode",
    "//chrome/browser/ash/login/users/avatar",
    "//chrome/browser/ash/login/users/default_user_image",
    "//chrome/browser/ash/privacy_hub",
    "//chrome/browser/ash/profiles",
    "//chrome/browser/ash/system_web_apps/apps",
    "//chrome/browser/ash/wallpaper",
    "//chrome/browser/feedback",
    "//chrome/browser/ui/ash/thumbnail_loader",
    "//chrome/browser/web_applications",
    "//chrome/browser/web_applications/mojom:mojom_web_apps_enum_shared",
    "//chrome/browser/web_applications/mojom:mojom_web_apps_enum_shared_cpp_sources",
    "//chromeos/ash/components/browser_context_helper",
    "//chromeos/ash/components/geolocation",
    "//chromeos/ash/components/local_search_service/public/cpp",
    "//chromeos/constants",
    "//chromeos/strings",
    "//components/feedback",
    "//components/user_manager:common",
    "//google_apis",
    "//mojo/public/cpp/bindings:bindings_base",
    "//third_party/blink/public/mojom:mojom_platform_shared",
    "//third_party/blink/public/mojom:mojom_platform_shared_cpp_sources",
    "//third_party/icu:icui18n",
    "//third_party/icu:icui18n_hidden_visibility",
    "//ui/aura",
    "//ui/base",
    "//ui/chromeos",
    "//ui/display",
    "//ui/gfx:color_utils",
    "//ui/gfx/codec",
  ]

  allow_circular_includes_from = [ "//chrome/browser/ash/app_list/search" ]
}

static_library("test_support") {
  testonly = true

  sources = [
    "personalization_app_mocha_test_base.cc",
    "personalization_app_mocha_test_base.h",
    "test_personalization_app_webui_provider.cc",
    "test_personalization_app_webui_provider.h",
    "test_sea_pen_observer.cc",
    "test_sea_pen_observer.h",
  ]

  public_deps = [
    "//base/test:test_support",
    "//chrome/test:test_support_ui",
    "//content/public/browser",
    "//content/test:test_support",
    "//url",
  ]

  deps = [
    ":personalization_app",
    "//ash",
    "//ash:test_support",
    "//ash/constants",
    "//ash/webui/personalization_app",
    "//ash/webui/personalization_app:test_support",
    "//chrome/browser/ash/wallpaper_handlers:test_support",
    "//chrome/browser/profiles:profile",
    "//chrome/browser/ui",
    "//chrome/browser/ui/ash/wallpaper",
    "//components/manta",
  ]
}

source_set("browser_tests") {
  testonly = true

  defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]

  sources = [
    "personalization_app_integration_browsertest.cc",
    "personalization_app_time_of_day_browsertest.cc",
    "personalization_app_wallpaper_daily_refresh_browsertest.cc",
    "personalization_app_wallpaper_info_browsertest.cc",
  ]

  deps = [
    ":personalization_app",
    ":test_support",
    "//ash",
    "//ash:test_support",
    "//ash/constants",
    "//ash/public/cpp",
    "//ash/public/cpp:test_support",
    "//ash/webui/personalization_app",
    "//ash/webui/personalization_app/proto",
    "//ash/webui/system_apps/public:system_web_app_type",
    "//base",
    "//base:i18n",
    "//base/test:test_support",
    "//chrome/browser:browser_process",
    "//chrome/browser/apps/app_service:constants",
    "//chrome/browser/ash/system_web_apps/test_support:test_support_ui",
    "//chrome/browser/ash/wallpaper_handlers:test_support",
    "//chrome/browser/profiles:profile",
    "//chrome/browser/ui",
    "//chrome/browser/ui/ash/wallpaper",
    "//chrome/test:test_support_ui",
    "//chromeos/ash/components/geolocation",
    "//chromeos/constants",
    "//chromeos/ui/base",
    "//components/viz/common",
    "//content/public/browser",
    "//content/test:test_support",
    "//testing/gtest",
    "//ui/aura",
    "//ui/base",
    "//ui/compositor",
    "//ui/gfx:test_support",
    "//ui/views",
    "//url",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "ambient_video_albums_unittest.cc",
    "mock_personalization_app_manager.cc",
    "mock_personalization_app_manager.h",
    "personalization_app_ambient_provider_impl_unittest.cc",
    "personalization_app_keyboard_backlight_provider_impl_unittest.cc",
    "personalization_app_sea_pen_provider_impl_unittest.cc",
    "personalization_app_theme_provider_impl_unittest.cc",
    "personalization_app_user_provider_impl_unittest.cc",
    "personalization_app_utils_unittest.cc",
    "personalization_app_wallpaper_provider_impl_unittest.cc",
    "wallpaper_metrics_provider_unittest.cc",
  ]

  deps = [
    ":personalization_app",
    ":test_support",
    "//ash",
    "//ash:test_support",
    "//ash/constants",
    "//ash/public/cpp",
    "//ash/public/cpp:test_support",
    "//ash/style/mojom:color_scheme_shared",
    "//ash/style/mojom:color_scheme_shared_cpp_sources",
    "//ash/webui/common/mojom:sea_pen",
    "//ash/webui/common/mojom:sea_pen_shared",
    "//ash/webui/common/mojom:sea_pen_shared_cpp_sources",
    "//ash/webui/personalization_app",
    "//ash/webui/personalization_app/mojom",
    "//base",
    "//base:i18n",
    "//base/test:test_support",
    "//chrome/browser",
    "//chrome/browser/ash/login/demo_mode:test_support",
    "//chrome/browser/ash/login/users:test_support",
    "//chrome/browser/ash/login/users/avatar",
    "//chrome/browser/ash/login/users/avatar:test_support",
    "//chrome/browser/ash/login/users/default_user_image",
    "//chrome/browser/ash/policy/external_data/handlers",
    "//chrome/browser/ash/settings",
    "//chrome/browser/ash/settings:test_support",
    "//chrome/browser/ash/wallpaper_handlers:test_support",
    "//chrome/browser/profiles:profile",
    "//chrome/browser/ui/ash/wallpaper",
    "//chrome/browser/ui/ash/wallpaper:test_support",
    "//chrome/common:constants",
    "//chrome/test:test_support",
    "//chrome/test:test_support_unit",
    "//chromeos/ash/components/install_attributes:test_support",
    "//chromeos/constants",
    "//chromeos/strings",
    "//chromeos/strings:strings_grit",
    "//components/account_id",
    "//components/keyed_service/core",
    "//components/manta",
    "//components/manta/proto",
    "//components/policy:generated",
    "//components/policy:policy_code_generate",
    "//components/prefs",
    "//components/prefs:test_support",
    "//components/signin/public/base",
    "//components/signin/public/identity_manager",
    "//components/signin/public/identity_manager:test_support",
    "//components/user_manager",
    "//components/user_manager:common",
    "//content/public/browser",
    "//content/test:test_support",
    "//mojo/public/cpp/base",
    "//mojo/public/cpp/bindings",
    "//mojo/public/cpp/test_support:test_utils",
    "//services/data_decoder/public/cpp:test_support",
    "//services/video_capture/public/mojom",
    "//skia",
    "//testing/gmock",
    "//testing/gtest",
    "//ui/base",
    "//ui/gfx",
    "//ui/gfx:test_support",
    "//ui/gfx/codec",
    "//url",
  ]
}