chromium/chrome/browser/ash/app_list/app_service/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("app_service") {
  sources = [
    "app_service_app_icon_loader.cc",
    "app_service_app_icon_loader.h",
    "app_service_app_item.cc",
    "app_service_app_item.h",
    "app_service_app_model_builder.cc",
    "app_service_app_model_builder.h",
    "app_service_context_menu.cc",
    "app_service_context_menu.h",
    "app_service_promise_app_context_menu.cc",
    "app_service_promise_app_context_menu.h",
    "app_service_promise_app_icon_loader.cc",
    "app_service_promise_app_icon_loader.h",
    "app_service_promise_app_item.cc",
    "app_service_promise_app_item.h",
    "app_service_promise_app_model_builder.cc",
    "app_service_promise_app_model_builder.h",
  ]

  public_deps = [ "//chrome/browser:browser_public_dependencies" ]

  deps = [
    "//ash/constants",
    "//ash/public/cpp",
    "//base",
    "//chrome/app:branded_strings",
    "//chrome/app:generated_resources",
    "//chrome/browser/apps/app_service/app_icon:util",
    "//chrome/browser/ash/app_list",
    "//chrome/browser/ash/app_list/arc",
    "//chrome/browser/ash/app_restore",
    "//chrome/browser/ash/arc",
    "//chrome/browser/ash/crostini",
    "//chrome/browser/ash/guest_os",
    "//chrome/browser/ash/plugin_vm",
    "//chrome/browser/ash/remote_apps",
    "//chrome/browser/profiles:profile",
    "//chrome/browser/ui/webui/ash/settings/app_management",
    "//chromeos/constants",
    "//components/app_constants",
    "//components/services/app_service",
    "//components/sync/model",
    "//components/sync/protocol",
    "//content/public/browser",
    "//ui/base",
    "//ui/color",
    "//ui/display",
    "//ui/gfx",
    "//ui/views",
  ]

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

source_set("unit_tests") {
  testonly = true

  sources = [
    "app_service_app_model_builder_unittest.cc",
    "app_service_promise_app_model_builder_unittest.cc",
  ]

  deps = [
    "//ash/constants",
    "//ash/public/cpp",
    "//base",
    "//base/test:test_support",
    "//chrome/app:generated_resources",
    "//chrome/browser/apps:icon_standardizer",
    "//chrome/browser/apps/app_service",
    "//chrome/browser/apps/app_service:test_support",
    "//chrome/browser/ash/app_list",
    "//chrome/browser/ash/app_list:test_support",
    "//chrome/browser/ash/app_list/app_service",
    "//chrome/browser/ash/app_list/internal_app",
    "//chrome/browser/ash/app_list/test:test_support",
    "//chrome/browser/ash/borealis",
    "//chrome/browser/ash/borealis/testing:test_support",
    "//chrome/browser/ash/crostini:test_support",
    "//chrome/browser/ash/guest_os",
    "//chrome/browser/ash/login/demo_mode:test_support",
    "//chrome/browser/ash/plugin_vm",
    "//chrome/browser/ash/plugin_vm:test_support",
    "//chrome/browser/extensions",
    "//chrome/browser/profiles:profile",
    "//chrome/browser/ui",
    "//chrome/browser/web_applications",
    "//chrome/browser/web_applications:web_applications_test_support",
    "//chrome/browser/web_applications/mojom:mojom_web_apps_enum",
    "//chrome/common:chrome_features",
    "//chrome/common:constants",
    "//chrome/common:non_code_constants",
    "//chrome/test:test_support",
    "//chromeos/ash/components/dbus/cicerone",
    "//chromeos/ash/components/dbus/concierge",
    "//chromeos/ash/components/dbus/seneschal",
    "//chromeos/ash/components/settings",
    "//chromeos/constants",
    "//components/policy/core/common:common_constants",
    "//components/prefs",
    "//components/services/app_service/public/cpp:app_types",
    "//components/services/app_service/public/cpp/shortcut",
    "//content/test:test_support",
    "//extensions/common",
    "//services/network:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//ui/base",
    "//ui/display:test_support",
    "//ui/gfx",
    "//ui/gfx:test_support",
    "//ui/gfx/codec",
  ]
}

source_set("browser_tests") {
  testonly = true

  defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]

  sources = [
    "app_service_app_item_browsertest.cc",
    "app_service_context_menu_browsertest.cc",
    "app_service_promise_app_item_browsertest.cc",
  ]

  deps = [
    ":app_service",
    "//ash",
    "//ash:test_support",
    "//ash/app_list",
    "//ash/app_list/model:app_list_model",
    "//ash/components/arc",
    "//ash/components/arc:arc_test_support",
    "//ash/components/arc:notification_test_support",
    "//ash/components/arc/mojom",
    "//ash/components/arc/session:connection_holder",
    "//ash/constants",
    "//ash/public/cpp",
    "//base",
    "//base/test:test_support",
    "//chrome/app:generated_resources",
    "//chrome/browser",
    "//chrome/browser/apps/app_service",
    "//chrome/browser/apps/app_service:constants",
    "//chrome/browser/ash/app_list",
    "//chrome/browser/ash/app_list/arc:test_support",
    "//chrome/browser/ash/app_list/test:test_support",
    "//chrome/browser/ash/arc",
    "//chrome/browser/ash/arc/session",
    "//chrome/browser/ash/system_web_apps",
    "//chrome/browser/profiles:profile",
    "//chrome/browser/ui",
    "//chrome/browser/ui/ash/shelf",
    "//chrome/browser/web_applications",
    "//chrome/browser/web_applications:web_applications_test_support",
    "//chrome/common:constants",
    "//chrome/test:test_support",
    "//chrome/test:test_support_ui",
    "//chromeos/constants",
    "//components/account_id",
    "//components/services/app_service",
    "//components/sync:test_support",
    "//components/sync/model",
    "//components/sync/protocol",
    "//components/webapps/common",
    "//content/test:test_support",
    "//net",
    "//ui/base",
    "//ui/display",
    "//ui/events:event_constants",
    "//ui/views",
    "//url",
  ]
}