BUILD.gn 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # Copyright 2019 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("//tools/grit/grit_rule.gni")
  5. if (is_fuchsia) {
  6. import("//build/config/fuchsia/generate_runner_scripts.gni")
  7. }
  8. # TODO(crbug.com/1104369): Deprecated. Delete after off-tree clients
  9. # are migrated to use NamedMessagePortConnector directly.
  10. source_set("named_message_port_connector_resources") {
  11. data_deps = [ ":bindings_resources" ]
  12. deps = [ ":bindings_resources" ]
  13. }
  14. # TODO(crbug.com/1104369): Deprecated. Delete after off-tree clients
  15. # are migrated to use NamedMessagePortConnector directly.
  16. grit("bindings_resources") {
  17. source = "bindings_resources.grd"
  18. outputs = [
  19. "grit/resources.h",
  20. "bindings_resources.pak",
  21. ]
  22. resource_ids = ""
  23. }
  24. # Transitional target for //components/cast_api_bindings/bindings_manager.
  25. # TODO(crbug.com/1104369): Remove this and replace platform-specific
  26. # subclasses with cross-platform implementation.
  27. source_set("bindings_manager") {
  28. sources = [ "bindings_manager.h" ]
  29. deps = [ "//components/cast/api_bindings:manager" ]
  30. }
  31. if (is_fuchsia) {
  32. source_set("bindings_manager_fuchsia") {
  33. sources = [
  34. "bindings_manager_fuchsia.cc",
  35. "bindings_manager_fuchsia.h",
  36. ]
  37. public_deps = [
  38. ":bindings_manager",
  39. "//fuchsia_web/runners/cast/fidl",
  40. "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.mem",
  41. ]
  42. deps = [
  43. "//base",
  44. "//components/cast/message_port",
  45. ]
  46. }
  47. }
  48. if (is_linux || is_chromeos || is_android) {
  49. source_set("bindings_manager_cast") {
  50. sources = [
  51. "bindings_manager_cast.cc",
  52. "bindings_manager_cast.h",
  53. ]
  54. deps = [
  55. ":bindings_manager",
  56. "//base",
  57. "//chromecast/bindings/public/mojom",
  58. "//components/cast/api_bindings:manager",
  59. "//components/cast/message_port:message_port_cast",
  60. "//mojo/public/cpp/bindings",
  61. "//third_party/blink/public/common",
  62. ]
  63. }
  64. source_set("browsertests_cast") {
  65. testonly = true
  66. sources = [ "bindings_manager_cast_browsertest.cc" ]
  67. defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
  68. data = [ "//chromecast/bindings/testdata" ]
  69. deps = [
  70. "//base",
  71. "//chromecast:chromecast_buildflags",
  72. "//chromecast/base",
  73. "//chromecast/base:chromecast_switches",
  74. "//chromecast/bindings:bindings_manager_cast",
  75. "//chromecast/browser:browser",
  76. "//chromecast/browser:client",
  77. "//chromecast/browser:public",
  78. "//components/cast/message_port:test_message_port_receiver",
  79. "//components/cast/named_message_port_connector:resources",
  80. "//content/public/browser",
  81. "//content/test:test_support",
  82. "//net:test_support",
  83. ]
  84. }
  85. }
  86. source_set("browsertests") {
  87. testonly = true
  88. deps = []
  89. if (is_linux || is_chromeos || is_android) {
  90. deps += [ "//chromecast/bindings:browsertests_cast" ]
  91. }
  92. }