chromium/chrome/browser/ui/ash/assistant/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")
import("//chromeos/ash/components/assistant/assistant.gni")

assert(is_chromeos_ash)

static_library("assistant") {
  sources = [
    "assistant_browser_delegate_impl.cc",
    "assistant_browser_delegate_impl.h",
    "assistant_setup.cc",
    "assistant_setup.h",
    "assistant_state_client.cc",
    "assistant_state_client.h",
    "device_actions.cc",
    "device_actions.h",
    "device_actions_delegate.h",
    "device_actions_delegate_impl.cc",
    "device_actions_delegate_impl.h",
    "search_and_assistant_enabled_checker.cc",
    "search_and_assistant_enabled_checker.h",
  ]

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

  deps = [
    "//ash/components/arc:arc_base_utils",
    "//ash/components/arc/mojom",
    "//ash/components/arc/session",
    "//ash/constants",
    "//ash/public/cpp",
    "//base",
    "//chrome/browser/ash/app_list/arc",
    "//chrome/browser/ash/arc",
    "//chrome/browser/ash/arc/session",
    "//chrome/browser/ash/assistant",
    "//chrome/browser/ash/crosapi:browser_util",
    "//chrome/browser/ash/profiles",
    "//chrome/browser/profiles",
    "//chrome/browser/profiles:profile",
    "//chrome/browser/ui/webui/ash/assistant_optin",
    "//chrome/common",
    "//chromeos/ash/components/assistant:buildflags",
    "//chromeos/ash/components/network",
    "//chromeos/ash/services/assistant:lib",
    "//chromeos/ash/services/assistant/public/cpp",
    "//chromeos/ash/services/assistant/public/proto",
    "//chromeos/ash/services/bluetooth_config/public/mojom",
    "//chromeos/crosapi/cpp",
    "//chromeos/dbus/power",
    "//chromeos/dbus/power:power_manager_proto",
    "//components/language/core/browser",
    "//components/session_manager/core",
    "//content/public/browser",
    "//content/public/common",
    "//mojo/public/cpp/bindings",
    "//services/data_decoder/public/cpp",
    "//services/network/public/cpp",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "assistant_state_client_unittest.cc",
    "device_actions_unittest.cc",
    "search_and_assistant_enabled_checker_unittest.cc",
  ]

  deps = [
    ":assistant",
    "//ash/components/arc:arc_base_utils",
    "//ash/components/arc:arc_test_support",
    "//ash/public/cpp",
    "//base",
    "//chrome/browser/ash/app_list/arc",
    "//chrome/browser/ash/arc/session",
    "//chrome/browser/ash/arc/test:arc_test_support",
    "//chrome/browser/ash/login/users:test_support",
    "//chrome/test:test_support",
    "//chrome/test:test_support_unit",
    "//chromeos/ash/components/dbus/concierge",
    "//chromeos/ash/services/assistant:lib",
    "//chromeos/ash/services/assistant/public/cpp",
    "//chromeos/services/assistant/public/shared",
    "//components/language/core/browser",
    "//components/prefs",
    "//components/user_manager",
    "//testing/gtest",
  ]
}

if (enable_assistant_integration_tests) {
  static_library("browser_test_support") {
    testonly = true

    sources = [
      "assistant_test_mixin.cc",
      "assistant_test_mixin.h",
    ]

    deps = [
      "//ash:test_support",
      "//ash/assistant/model",
      "//ash/assistant/ui",
      "//ash/assistant/ui:constants",
      "//ash/constants",
      "//ash/public/cpp",
      "//base",
      "//base/test:test_support",
      "//chrome/browser",
      "//chrome/browser/ash/login/test:test_support",
      "//chrome/browser/ui",
      "//chrome/browser/ui/ash/assistant/test_support",
      "//chrome/test:test_support_ui",
      "//chromeos/ash/components/login/auth/public:authpublic",
      "//components/account_id",
      "//components/language/core/browser",
      "//google_apis",
      "//net:test_support",
      "//ui/events:test_support",
      "//ui/views",
    ]
  }

  source_set("browser_tests") {
    testonly = true

    defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]

    sources = [
      "assistant_browsertest.cc",
      "assistant_timers_browsertest.cc",
    ]

    deps = [
      ":assistant",
      ":browser_test_support",
      "//ash/assistant/model",
      "//ash/assistant/ui",
      "//ash/assistant/ui",
      "//ash/assistant/ui:constants",
      "//ash/public/cpp:test_support",
      "//base",
      "//base/test:test_support",
      "//chrome/browser/ui/ash/assistant/test_support",
      "//chrome/test:test_support",
      "//chromeos/ash/components/assistant/test_support",
      "//chromeos/ash/components/audio",
      "//chromeos/ash/services/assistant:lib",
      "//chromeos/ash/services/assistant/public/cpp",
      "//chromeos/dbus/power:power_manager_proto",
      "//components/language/core/browser",
      "//content/test:test_support",
      "//ui/events:test_support",
    ]
  }
}