BUILD.gn 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # Copyright 2018 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. if (is_android) {
  5. import("//build/config/android/rules.gni")
  6. }
  7. static_library("send_tab_to_self") {
  8. sources = [
  9. "entry_point_display_reason.cc",
  10. "entry_point_display_reason.h",
  11. "features.h",
  12. "metrics_util.cc",
  13. "metrics_util.h",
  14. "pref_names.cc",
  15. "pref_names.h",
  16. "send_tab_to_self_bridge.cc",
  17. "send_tab_to_self_bridge.h",
  18. "send_tab_to_self_entry.cc",
  19. "send_tab_to_self_entry.h",
  20. "send_tab_to_self_model.cc",
  21. "send_tab_to_self_model.h",
  22. "send_tab_to_self_model_observer.h",
  23. "send_tab_to_self_model_type_controller.cc",
  24. "send_tab_to_self_model_type_controller.h",
  25. "send_tab_to_self_sync_service.cc",
  26. "send_tab_to_self_sync_service.h",
  27. "target_device_info.cc",
  28. "target_device_info.h",
  29. ]
  30. deps = [
  31. "//base",
  32. "//components/history/core/browser",
  33. "//components/keyed_service/core",
  34. "//components/prefs",
  35. "//components/send_tab_to_self/proto:send_tab_to_self_proto",
  36. "//components/signin/public/base",
  37. "//components/signin/public/identity_manager",
  38. "//components/strings",
  39. "//components/sync",
  40. "//components/sync_device_info",
  41. "//components/version_info",
  42. "//google_apis",
  43. "//ui/base",
  44. "//url",
  45. ]
  46. public_deps = [ "//components/send_tab_to_self/proto:send_tab_to_self_proto" ]
  47. if (is_android) {
  48. sources += [
  49. "send_tab_to_self_infobar_delegate.cc",
  50. "send_tab_to_self_infobar_delegate.h",
  51. ]
  52. deps += [
  53. "//components/infobars/core",
  54. "//content/public/browser",
  55. ]
  56. }
  57. }
  58. if (is_android) {
  59. java_cpp_enum("java_enum_srcjar") {
  60. visibility = [ ":*" ]
  61. sources = [ "entry_point_display_reason.h" ]
  62. }
  63. android_library("send_tab_to_self_java") {
  64. srcjar_deps = [ ":java_enum_srcjar" ]
  65. # Important: the generated enum uses the @IntDef annotation provided by
  66. # this dependency.
  67. deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ]
  68. }
  69. }
  70. source_set("test_support") {
  71. testonly = true
  72. sources = [
  73. "test_send_tab_to_self_model.cc",
  74. "test_send_tab_to_self_model.h",
  75. ]
  76. deps = [
  77. ":send_tab_to_self",
  78. "//base",
  79. ]
  80. }
  81. source_set("unit_tests") {
  82. testonly = true
  83. sources = [
  84. "entry_point_display_reason_unittest.cc",
  85. "send_tab_to_self_bridge_unittest.cc",
  86. "send_tab_to_self_entry_unittest.cc",
  87. "target_device_info_unittest.cc",
  88. ]
  89. deps = [
  90. ":send_tab_to_self",
  91. ":test_support",
  92. "//base",
  93. "//base/test:test_support",
  94. "//components/history/core/browser",
  95. "//components/prefs:test_support",
  96. "//components/send_tab_to_self/proto:send_tab_to_self_proto",
  97. "//components/sync:test_support",
  98. "//components/sync_device_info:test_support",
  99. "//components/sync_preferences:test_support",
  100. "//testing/gtest",
  101. "//url",
  102. ]
  103. }