chromium/ash/components/arc/session/BUILD.gn

# Copyright 2021 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("session") {
  sources = [
    "adb_sideloading_availability_delegate.h",
    "arc_bridge_host_impl.cc",
    "arc_bridge_host_impl.h",
    "arc_bridge_service.cc",
    "arc_bridge_service.h",
    "arc_client_adapter.cc",
    "arc_client_adapter.h",
    "arc_container_client_adapter.cc",
    "arc_container_client_adapter.h",
    "arc_data_remover.cc",
    "arc_data_remover.h",
    "arc_dlc_installer.cc",
    "arc_dlc_installer.h",
    "arc_service_manager.cc",
    "arc_service_manager.h",
    "arc_session.cc",
    "arc_session.h",
    "arc_session_impl.cc",
    "arc_session_impl.h",
    "arc_session_runner.cc",
    "arc_session_runner.h",
    "arc_start_params.cc",
    "arc_start_params.h",
    "arc_upgrade_params.cc",
    "arc_upgrade_params.h",
    "arc_vm_client_adapter.cc",
    "arc_vm_client_adapter.h",
    "file_system_status.cc",
    "file_system_status.h",
    "mojo_invitation_manager.cc",
    "mojo_invitation_manager.h",
    "serial_number_util.cc",
    "serial_number_util.h",
  ]

  deps = [
    ":arc_base_enums",
    ":connection_holder",
    "//ash",
    "//ash/components/arc:arc_base_utils",
    "//ash/components/arc:arc_features",
    "//ash/components/arc:prefs",
    "//ash/components/arc/mojom",
    "//ash/constants:constants",
    "//ash/public/cpp",
    "//ash/public/cpp/external_arc:external_arc",
    "//chromeos/ash/components/cryptohome",
    "//chromeos/ash/components/dbus/concierge",
    "//chromeos/ash/components/dbus/concierge:concierge_proto",
    "//chromeos/ash/components/dbus/debug_daemon",
    "//chromeos/ash/components/dbus/dlcservice",
    "//chromeos/ash/components/dbus/dlcservice:dlcservice_proto",
    "//chromeos/ash/components/dbus/patchpanel:patchpanel",
    "//chromeos/ash/components/dbus/session_manager",
    "//chromeos/ash/components/dbus/spaced:spaced",
    "//chromeos/ash/components/dbus/upstart",
    "//chromeos/ash/components/memory:memory",
    "//chromeos/ash/components/mojo_service_manager",
    "//chromeos/ash/components/system",
    "//chromeos/system",
    "//components/prefs:prefs",
    "//components/user_manager",
    "//components/version_info",
    "//mojo/proxy:switches",
    "//services/accessibility/android/public/mojom",
    "//ui/display/manager",
  ]

  data_deps = [ ":mojo_service_manager_policy" ]
}

copy("mojo_service_manager_policy") {
  sources = [ "arc_bridge_policy.jsonc" ]
  outputs = [ "$root_out_dir/mojo_service_manager/{{source_file_part}}" ]
}

source_set("connection_holder") {
  sources = [
    "connection_holder.h",
    "connection_notifier.cc",
    "connection_notifier.h",
    "connection_observer.h",
    "mojo_channel.h",
  ]

  deps = [
    "//base",
    "//mojo/public/cpp/bindings",
  ]
}

static_library("arc_base_enums") {
  sources = [
    "arc_instance_mode.cc",
    "arc_instance_mode.h",
    "arc_management_transition.cc",
    "arc_management_transition.h",
    "arc_stop_reason.cc",
    "arc_stop_reason.h",
    "arc_vm_data_migration_status.cc",
    "arc_vm_data_migration_status.h",
  ]

  deps = [ "//base" ]
}

source_set("unit_tests") {
  testonly = true

  data = [ "//ash/components/arc/test/data/mem_profile/" ]

  sources = [
    "arc_bridge_host_impl_unittest.cc",
    "arc_bridge_service_unittest.cc",
    "arc_client_adapter_unittest.cc",
    "arc_container_client_adapter_unittest.cc",
    "arc_data_remover_unittest.cc",
    "arc_dlc_installer_unittest.cc",
    "arc_instance_mode_unittest.cc",
    "arc_management_transition_unittest.cc",
    "arc_session_impl_unittest.cc",
    "arc_session_runner_unittest.cc",
    "arc_stop_reason_unittest.cc",
    "arc_upgrade_params_unittest.cc",
    "arc_vm_client_adapter_unittest.cc",
    "connection_holder_unittest.cc",
    "connection_notifier_unittest.cc",
    "file_system_status_unittest.cc",
    "mojo_invitation_manager_unittest.cc",
    "serial_number_util_unittest.cc",
  ]

  deps = [
    ":arc_base_enums",
    ":session",
    "//ash:test_support",
    "//ash/components/arc:arc_base",
    "//ash/components/arc:arc_test_support",
    "//ash/components/arc:prefs",
    "//ash/constants",
    "//base/test:test_support",
    "//chromeos/ash/components/cryptohome",
    "//chromeos/ash/components/dbus/concierge",
    "//chromeos/ash/components/dbus/debug_daemon",
    "//chromeos/ash/components/dbus/dlcservice",
    "//chromeos/ash/components/dbus/patchpanel:patchpanel",
    "//chromeos/ash/components/dbus/session_manager",
    "//chromeos/ash/components/dbus/upstart",
    "//chromeos/ash/components/system",
    "//components/account_id",
    "//components/prefs:test_support",
    "//components/user_manager",
    "//components/user_manager:test_support",
    "//components/version_info",
    "//content/test:test_support",
    "//ui/views:views",
  ]
}