chromium/chrome/browser/ash/android_sms/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("android_sms") {
  sources = [
    "android_sms_app_manager.cc",
    "android_sms_app_manager.h",
    "android_sms_app_manager_impl.cc",
    "android_sms_app_manager_impl.h",
    "android_sms_app_setup_controller.h",
    "android_sms_app_setup_controller_impl.cc",
    "android_sms_app_setup_controller_impl.h",
    "android_sms_pairing_state_tracker_impl.cc",
    "android_sms_pairing_state_tracker_impl.h",
    "android_sms_service.cc",
    "android_sms_service.h",
    "android_sms_service_factory.cc",
    "android_sms_service_factory.h",
    "android_sms_switches.cc",
    "android_sms_switches.h",
    "android_sms_urls.cc",
    "android_sms_urls.h",
    "connection_establisher.h",
    "connection_manager.cc",
    "connection_manager.h",
    "fcm_connection_establisher.cc",
    "fcm_connection_establisher.h",
  ]

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

  deps = [
    "//ash/constants",
    "//base",
    "//chrome/browser/apps/app_service:constants",
    "//chrome/browser/ash/app_list",
    "//chrome/browser/ash/profiles",
    "//chrome/browser/notifications",
    "//chrome/browser/profiles",
    "//chrome/browser/web_applications",
    "//chromeos/ash/components/multidevice",
    "//chromeos/ash/services/multidevice_setup/public/cpp",
    "//chromeos/ash/services/multidevice_setup/public/cpp:android_sms_app_helper_delegate",
    "//chromeos/ash/services/multidevice_setup/public/cpp:android_sms_pairing_state_tracker",
    "//chromeos/ash/services/multidevice_setup/public/cpp:prefs",
    "//components/content_settings/core/browser",
    "//components/keyed_service/content",
    "//components/keyed_service/core",
    "//components/pref_registry",
    "//components/prefs",
    "//components/services/app_service/public/cpp:app_types",
    "//components/session_manager/core",
    "//components/webapps/browser",
    "//components/webapps/common",
    "//content/public/browser",
    "//mojo/public/cpp/bindings",
    "//net",
    "//services/network/public/mojom:cookies_mojom",
    "//third_party/blink/public/common",
    "//third_party/blink/public/common:headers",
    "//url",
  ]
}

static_library("test_support") {
  testonly = true

  sources = [
    "fake_android_sms_app_manager.cc",
    "fake_android_sms_app_manager.h",
    "fake_android_sms_app_setup_controller.cc",
    "fake_android_sms_app_setup_controller.h",
    "fake_connection_establisher.cc",
    "fake_connection_establisher.h",
  ]

  deps = [
    ":android_sms",
    "//base",
    "//chrome/browser/web_applications:web_applications_test_support",
    "//chromeos/ash/components/multidevice",
    "//chromeos/ash/services/multidevice_setup/public/cpp:test_support",
    "//components/webapps/common",
    "//url",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "android_sms_app_manager_impl_unittest.cc",
    "android_sms_app_setup_controller_impl_unittest.cc",
    "connection_manager_unittest.cc",
    "fcm_connection_establisher_unittest.cc",
  ]

  deps = [
    ":android_sms",
    ":test_support",
    "//ash/constants",
    "//base",
    "//base/test:test_support",
    "//chrome/browser/apps/app_service",
    "//chrome/browser/web_applications",
    "//chrome/browser/web_applications:web_applications_test_support",
    "//chrome/test:test_support",
    "//chromeos/ash/services/multidevice_setup/public/cpp:test_support",
    "//components/content_settings/core/browser",
    "//components/sync_preferences:test_support",
    "//testing/gtest",
    "//third_party/blink/public/common:headers",
  ]
}