chromium/chrome/browser/ash/borealis/BUILD.gn

# Copyright 2023 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("//mojo/public/tools/bindings/mojom.gni")

assert(is_chromeos_ash)

mojom("borealis_installer_types_mojom") {
  webui_module_path = "/"
  sources = [ "borealis_types.mojom" ]
}

static_library("borealis") {
  sources = [
    "borealis_app_launcher.cc",
    "borealis_app_launcher.h",
    "borealis_app_launcher_impl.cc",
    "borealis_app_launcher_impl.h",
    "borealis_app_uninstaller.cc",
    "borealis_app_uninstaller.h",
    "borealis_context.cc",
    "borealis_context.h",
    "borealis_context_manager.h",
    "borealis_context_manager_impl.cc",
    "borealis_context_manager_impl.h",
    "borealis_credits.cc",
    "borealis_credits.h",
    "borealis_engagement_metrics.cc",
    "borealis_engagement_metrics.h",
    "borealis_features.cc",
    "borealis_features.h",
    "borealis_game_install_flow.cc",
    "borealis_game_install_flow.h",
    "borealis_hardware_checker.cc",
    "borealis_hardware_checker.h",
    "borealis_install_url_handler.cc",
    "borealis_install_url_handler.h",
    "borealis_installer.cc",
    "borealis_installer.h",
    "borealis_installer_impl.cc",
    "borealis_installer_impl.h",
    "borealis_launch_options.cc",
    "borealis_launch_options.h",
    "borealis_metrics.cc",
    "borealis_metrics.h",
    "borealis_power_controller.cc",
    "borealis_power_controller.h",
    "borealis_prefs.cc",
    "borealis_prefs.h",
    "borealis_security_delegate.cc",
    "borealis_security_delegate.h",
    "borealis_service.cc",
    "borealis_service.h",
    "borealis_service_factory.cc",
    "borealis_service_factory.h",
    "borealis_service_impl.cc",
    "borealis_service_impl.h",
    "borealis_shutdown_monitor.cc",
    "borealis_shutdown_monitor.h",
    "borealis_survey_handler.cc",
    "borealis_survey_handler.h",
    "borealis_switches.cc",
    "borealis_switches.h",
    "borealis_task.cc",
    "borealis_task.h",
    "borealis_util.cc",
    "borealis_util.h",
    "borealis_window_manager.cc",
    "borealis_window_manager.h",
  ]

  public_deps = [
    "//ash",
    "//base",
    "//chrome/browser:browser_public_dependencies",
    "//chrome/browser/ash/borealis:borealis_installer_types_mojom",
    "//chrome/browser/ash/borealis/infra",
    "//chrome/browser/ash/hats",
    "//chrome/browser/profiles:profile",
    "//chromeos/ash/components/dbus/cicerone",
    "//chromeos/ash/components/dbus/concierge",
    "//chromeos/ash/components/dbus/dlcservice",
    "//components/keyed_service/core",
    "//components/services/app_service/public/cpp:instance_update",
    "//mojo/public/cpp/bindings",
    "//services/device/public/mojom",
    "//ui/aura",
    "//ui/views",
  ]

  deps = [
    "//ash/constants",
    "//ash/public/cpp",
    "//chrome/app:generated_resources",
    "//chrome/browser/ash/guest_os/infra",
    "//chrome/browser/ash/guest_os/virtual_machines",
    "//chrome/browser/ash/profiles",
    "//chrome/common:chrome_features",
    "//chromeos/ash/components/borealis",
    "//chromeos/ash/components/dbus",
    "//chromeos/ash/components/dbus:vm_applications_apps_proto",
    "//chromeos/ash/components/dbus:vm_launch_proto",
    "//chromeos/ash/components/dbus/cicerone:cicerone_proto_lib",
    "//chromeos/ash/components/dbus/concierge:concierge_proto_lib",
    "//chromeos/ash/components/dbus/dlcservice:dlcservice_proto",
    "//chromeos/ash/components/install_attributes",
    "//chromeos/ash/components/settings",
    "//chromeos/ash/components/system",
    "//chromeos/ui/base",
    "//components/crx_file",
    "//components/exo",
    "//components/guest_os",
    "//components/guest_os:prefs",
    "//components/keyed_service/content",
    "//components/prefs",
    "//components/version_info:channel",
    "//content/public/browser",
    "//third_party/re2",
    "//ui/base",
    "//ui/display",
    "//url",
  ]
}

static_library("test_support") {
  testonly = true

  sources = [
    "borealis_context_manager_mock.cc",
    "borealis_context_manager_mock.h",
    "borealis_service_fake.cc",
    "borealis_service_fake.h",
    "borealis_window_manager_mock.cc",
    "borealis_window_manager_mock.h",
  ]

  public_deps = [
    ":borealis",
    "//base",
    "//testing/gmock",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "borealis_app_launcher_unittest.cc",
    "borealis_app_uninstaller_unittest.cc",
    "borealis_context_manager_unittest.cc",
    "borealis_context_unittest.cc",
    "borealis_features_unittest.cc",
    "borealis_hardware_checker_unittest.cc",
    "borealis_install_url_handler_unittest.cc",
    "borealis_installer_unittest.cc",
    "borealis_power_controller_unittest.cc",
    "borealis_security_delegate_unittest.cc",
    "borealis_shutdown_monitor_unittest.cc",
    "borealis_survey_handler_unittest.cc",
    "borealis_task_unittest.cc",
    "borealis_util_unittest.cc",
    "borealis_window_manager_unittest.cc",
  ]

  deps = [
    ":borealis",
    "//ash",
    "//ash/constants",
    "//ash/public/cpp",
    "//ash/public/cpp:test_support",
    "//base",
    "//base/test:test_support",
    "//chrome/browser",
    "//chrome/browser/ash/borealis:borealis_installer_types_mojom",
    "//chrome/browser/ash/borealis:test_support",
    "//chrome/browser/ash/borealis/infra:unit_tests",
    "//chrome/browser/ash/borealis/testing:test_support",
    "//chrome/browser/ash/guest_os",
    "//chrome/browser/ash/guest_os:test_support",
    "//chrome/browser/ash/guest_os/public",
    "//chrome/browser/ash/login/users:test_support",
    "//chrome/common:chrome_features",
    "//chrome/test:test_support",
    "//chrome/test:test_support_unit",
    "//chromeos/ash/components/borealis",
    "//chromeos/ash/components/dbus",
    "//chromeos/ash/components/dbus:vm_applications_apps_proto",
    "//chromeos/ash/components/dbus/chunneld",
    "//chromeos/ash/components/dbus/cicerone",
    "//chromeos/ash/components/dbus/concierge",
    "//chromeos/ash/components/dbus/concierge:concierge_proto_lib",
    "//chromeos/ash/components/dbus/dlcservice",
    "//chromeos/ash/components/dbus/seneschal",
    "//chromeos/ash/components/dbus/spaced",
    "//chromeos/ash/components/settings",
    "//chromeos/ash/components/system",
    "//components/exo",
    "//components/prefs",
    "//components/sync_preferences:test_support",
    "//components/user_manager",
    "//content/test:test_support",
    "//mojo/public/cpp/bindings",
    "//net",
    "//services/device/public/cpp:test_support",
    "//services/device/public/mojom",
    "//services/network:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//ui/aura",
    "//ui/display",
    "//ui/display:test_support",
    "//ui/views",
    "//url",
  ]
}