chromium/chrome/browser/ui/ash/desks/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("desks") {
  sources = [
    "admin_template_service_factory.cc",
    "admin_template_service_factory.h",
    "chrome_desks_util.cc",
    "chrome_desks_util.h",
    "chrome_saved_desk_delegate.cc",
    "chrome_saved_desk_delegate.h",
    "desks_client.cc",
    "desks_client.h",
    "desks_templates_app_launch_handler.cc",
    "desks_templates_app_launch_handler.h",
  ]

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

  deps = [
    "//ash",
    "//ash/constants",
    "//ash/public/cpp",
    "//base",
    "//chrome/app/vector_icons",
    "//chrome/browser/apps:icon_standardizer",
    "//chrome/browser/apps/app_service",
    "//chrome/browser/apps/browser_instance",
    "//chrome/browser/ash/app_restore",
    "//chrome/browser/ash/crosapi:browser_util",
    "//chrome/browser/ash/floating_workspace",
    "//chrome/browser/ash/policy/external_data/handlers",
    "//chrome/browser/ash/profiles",
    "//chrome/browser/ash/system_web_apps",
    "//chrome/browser/chromeos/extensions/wm",
    "//chrome/browser/favicon",
    "//chrome/browser/profiles",
    "//chrome/browser/profiles:profile",
    "//chrome/browser/sync",
    "//chrome/browser/ui/ash/multi_user",
    "//chrome/browser/ui/ash/shelf",
    "//chrome/browser/ui/ash/system_web_apps",
    "//chrome/browser/web_applications",
    "//chrome/common",
    "//chromeos/crosapi/mojom",
    "//components/app_constants",
    "//components/app_restore",
    "//components/desks_storage",
    "//components/favicon/core",
    "//components/keyed_service/core",
    "//components/tab_groups",
    "//components/user_manager",
    "//ui/base",
    "//ui/color",
    "//ui/gfx",
    "//ui/wm",
    "//url",
  ]

  allow_circular_includes_from = [
    "//chrome/browser/ash/floating_workspace",
    "//chrome/browser/ash/policy/external_data/handlers",
    "//chrome/browser/chromeos/extensions/wm",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [ "chrome_saved_desk_delegate_unittest.cc" ]

  deps = [
    ":desks",
    "//ash/public/cpp",
    "//base/test:test_support",
    "//chrome/browser/ash/crosapi",
    "//chrome/browser/ash/login/users",
    "//chrome/browser/ash/login/users:test_support",
    "//chrome/browser/ash/profiles",
    "//chrome/test:test_support",
    "//chromeos/ui/base",
    "//components/app_restore",
    "//components/user_manager",
    "//content/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//ui/aura",
    "//ui/compositor",
  ]
}

source_set("browser_tests") {
  testonly = true

  defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]

  sources = [ "desks_client_browsertest.cc" ]

  deps = [
    ":desks",
    "//ash",
    "//ash/constants",
    "//ash/public/cpp",
    "//base",
    "//base/test:test_support",
    "//chrome/browser",
    "//chrome/browser/apps/app_service",
    "//chrome/browser/apps/platform_apps",
    "//chrome/browser/ash/app_restore",
    "//chrome/browser/ash/app_restore:test_support",
    "//chrome/browser/ash/crosapi",
    "//chrome/browser/ash/crosapi:browser_util",
    "//chrome/browser/ash/login",
    "//chrome/browser/ash/login:test_support",
    "//chrome/browser/ash/login/test:test_support",
    "//chrome/browser/ash/login/ui",
    "//chrome/browser/ash/login/users:test_support",
    "//chrome/browser/ash/profiles",
    "//chrome/browser/ash/system_web_apps",
    "//chrome/browser/ash/system_web_apps/apps",
    "//chrome/browser/extensions",
    "//chrome/browser/policy:test_support",
    "//chrome/browser/profiles:profile",
    "//chrome/browser/ui/ash",
    "//chrome/browser/ui/ash/multi_user",
    "//chrome/browser/ui/ash/system_web_apps",
    "//chrome/browser/web_applications:web_applications_test_support",
    "//chrome/test:test_support",
    "//chromeos/ui/base",
    "//chromeos/ui/frame",
    "//components/account_id",
    "//components/app_constants",
    "//components/app_restore",
    "//components/desks_storage",
    "//components/desks_storage:test_support",
    "//components/keep_alive_registry",
    "//components/tab_groups",
    "//content/test:test_support",
    "//extensions/common",
    "//ui/aura",
    "//ui/compositor",
    "//ui/display",
    "//ui/display:test_support",
    "//ui/events:test_support",
    "//ui/gfx",
    "//ui/views",
    "//url",
  ]
}

if (!is_chromeos_device) {
  source_set("interactive_ui_tests") {
    testonly = true

    defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]

    sources = [ "desks_interactive_uitest.cc" ]

    deps = [
      ":desks",
      "//ash",
      "//ash/public/cpp",
      "//base",
      "//base/test:test_support",
      "//chrome/browser/ui",
      "//chrome/test:test_support",
      "//chrome/test/base/ash/interactive:test_support",
      "//testing/gtest",
      "//ui/aura",
      "//ui/base",
      "//ui/compositor",
    ]
  }
}