BUILD.gn 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. component("common") {
  8. output_name = "quick_pair_common"
  9. defines = [ "IS_QUICK_PAIR_COMMON_IMPL" ]
  10. sources = [
  11. "account_key_failure.cc",
  12. "account_key_failure.h",
  13. "constants.cc",
  14. "constants.h",
  15. "device.cc",
  16. "device.h",
  17. "fast_pair/fast_pair_decoder.cc",
  18. "fast_pair/fast_pair_decoder.h",
  19. "fast_pair/fast_pair_feature_usage_metrics_logger.cc",
  20. "fast_pair/fast_pair_feature_usage_metrics_logger.h",
  21. "fast_pair/fast_pair_http_result.cc",
  22. "fast_pair/fast_pair_http_result.h",
  23. "fast_pair/fast_pair_metrics.cc",
  24. "fast_pair/fast_pair_metrics.h",
  25. "fast_pair/fast_pair_service_data_creator.cc",
  26. "fast_pair/fast_pair_service_data_creator.h",
  27. "log_buffer.cc",
  28. "log_buffer.h",
  29. "logging.cc",
  30. "logging.h",
  31. "pair_failure.cc",
  32. "pair_failure.h",
  33. "protocol.cc",
  34. "protocol.h",
  35. "quick_pair_browser_delegate.cc",
  36. "quick_pair_browser_delegate.h",
  37. ]
  38. deps = [
  39. "//ash/constants:constants",
  40. "//ash/services/quick_pair/public/mojom",
  41. "//base",
  42. "//chromeos/ash/components/feature_usage",
  43. "//components/prefs",
  44. "//device/bluetooth",
  45. "//device/bluetooth/public/cpp",
  46. "//net",
  47. "//services/network/public/cpp",
  48. "//services/network/public/mojom",
  49. ]
  50. }
  51. static_library("test_support") {
  52. testonly = true
  53. sources = [
  54. "fast_pair/fast_pair_service_data_creator.cc",
  55. "fast_pair/fast_pair_service_data_creator.h",
  56. "mock_quick_pair_browser_delegate.cc",
  57. "mock_quick_pair_browser_delegate.h",
  58. "quick_pair_browser_delegate.h",
  59. ]
  60. deps = [
  61. "//ash/services/quick_pair/public/mojom",
  62. "//base/test:test_support",
  63. "//components/image_fetcher/core",
  64. "//services/network/public/cpp",
  65. "//testing/gtest",
  66. ]
  67. }
  68. source_set("unit_tests") {
  69. testonly = true
  70. sources = [
  71. "device_unittest.cc",
  72. "fast_pair/fast_pair_decoder_unittest.cc",
  73. "fast_pair/fast_pair_feature_usage_metrics_logger_unittest.cc",
  74. "log_buffer_unittest.cc",
  75. "logging_unittest.cc",
  76. ]
  77. deps = [
  78. ":common",
  79. ":test_support",
  80. "//ash/constants:constants",
  81. "//base/test:test_support",
  82. "//chromeos/ash/components/feature_usage",
  83. "//components/prefs:test_support",
  84. "//device/bluetooth",
  85. "//device/bluetooth:mocks",
  86. "//testing/gtest",
  87. ]
  88. }