BUILD.gn 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. # Copyright 2021 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/config/chromeos/ui_mode.gni")
  5. assert(is_chromeos_ash,
  6. "Quick Pair protocols (e.g. Fast Pair) are ash-chrome only")
  7. static_library("feature_status_tracker") {
  8. sources = [
  9. "base_enabled_provider.cc",
  10. "base_enabled_provider.h",
  11. "bluetooth_enabled_provider.cc",
  12. "bluetooth_enabled_provider.h",
  13. "fast_pair_enabled_provider.cc",
  14. "fast_pair_enabled_provider.h",
  15. "fast_pair_pref_enabled_provider.cc",
  16. "fast_pair_pref_enabled_provider.h",
  17. "fast_pair_support_utils.cc",
  18. "fast_pair_support_utils.h",
  19. "google_api_key_availability_provider.cc",
  20. "google_api_key_availability_provider.h",
  21. "logged_in_user_enabled_provider.cc",
  22. "logged_in_user_enabled_provider.h",
  23. "quick_pair_feature_status_tracker.h",
  24. "quick_pair_feature_status_tracker_impl.cc",
  25. "quick_pair_feature_status_tracker_impl.h",
  26. "screen_state_enabled_provider.cc",
  27. "screen_state_enabled_provider.h",
  28. ]
  29. deps = [
  30. "//ash/constants",
  31. "//ash/public/cpp",
  32. "//ash/quick_pair/common",
  33. "//base",
  34. "//components/prefs",
  35. "//device/bluetooth",
  36. "//google_apis",
  37. "//skia",
  38. "//ui/display",
  39. "//ui/display/manager",
  40. ]
  41. }
  42. static_library("test_support") {
  43. testonly = true
  44. sources = [
  45. "fake_bluetooth_adapter.cc",
  46. "fake_bluetooth_adapter.h",
  47. "fake_feature_status_tracker.cc",
  48. "fake_feature_status_tracker.h",
  49. "mock_bluetooth_enabled_provider.cc",
  50. "mock_bluetooth_enabled_provider.h",
  51. "mock_fast_pair_pref_enabled_provider.cc",
  52. "mock_fast_pair_pref_enabled_provider.h",
  53. "mock_google_api_key_availability_provider.cc",
  54. "mock_google_api_key_availability_provider.h",
  55. "mock_logged_in_user_enabled_provider.cc",
  56. "mock_logged_in_user_enabled_provider.h",
  57. "mock_quick_pair_feature_status_tracker.cc",
  58. "mock_quick_pair_feature_status_tracker.h",
  59. "mock_screen_state_enabled_provider.cc",
  60. "mock_screen_state_enabled_provider.h",
  61. "quick_pair_feature_status_tracker.h",
  62. ]
  63. deps = [
  64. ":feature_status_tracker",
  65. "//base/test:test_support",
  66. "//device/bluetooth:mocks",
  67. "//skia",
  68. "//testing/gtest",
  69. ]
  70. }
  71. source_set("unit_tests") {
  72. testonly = true
  73. sources = [
  74. "base_enabled_provider_unittest.cc",
  75. "bluetooth_enabled_provider_unittest.cc",
  76. "fast_pair_enabled_provider_unittest.cc",
  77. "fast_pair_support_utils_unittest.cc",
  78. "logged_in_user_enabled_provider_unittest.cc",
  79. "screen_state_enabled_provider_unittest.cc",
  80. ]
  81. deps = [
  82. ":feature_status_tracker",
  83. ":test_support",
  84. "//ash:test_support",
  85. "//ash/constants",
  86. "//ash/quick_pair/common",
  87. "//base/test:test_support",
  88. "//device/bluetooth",
  89. "//device/bluetooth:mocks",
  90. "//skia",
  91. "//testing/gtest",
  92. "//ui/display/fake",
  93. ]
  94. }