BUILD.gn 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # Copyright 2020 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("//testing/test.gni")
  5. source_set("openscreen_platform") {
  6. sources = [
  7. "logging.cc",
  8. "network_util.cc",
  9. "network_util.h",
  10. "task_runner.cc",
  11. "task_runner.h",
  12. "time.cc",
  13. "trace_logging_platform.cc",
  14. ]
  15. public_deps = [ "//third_party/openscreen/src/platform" ]
  16. deps = [
  17. "//base",
  18. "//net",
  19. ]
  20. }
  21. # //net-based implementation of UdpSocket.
  22. # Incompatible with ":openscreen_platform_network_service".
  23. source_set("openscreen_platform_net") {
  24. sources = [
  25. "net_udp_socket.cc",
  26. "net_udp_socket.h",
  27. ]
  28. public_deps = [ ":openscreen_platform" ]
  29. deps = [
  30. "//base",
  31. "//net",
  32. ]
  33. }
  34. # Network service-based implementation of Open Screen platform.
  35. # Incompatible with ":openscreen_platform_net".
  36. source_set("openscreen_platform_network_service") {
  37. sources = [
  38. "network_context.cc",
  39. "network_context.h",
  40. "tls_client_connection.cc",
  41. "tls_client_connection.h",
  42. "tls_connection_factory.cc",
  43. "tls_connection_factory.h",
  44. "udp_socket.cc",
  45. "udp_socket.h",
  46. ]
  47. public_deps = [
  48. ":openscreen_platform",
  49. "//mojo/public/cpp/bindings",
  50. "//services/network/public/mojom",
  51. ]
  52. deps = [
  53. "//base",
  54. "//services/network:network_service",
  55. ]
  56. }
  57. if (!is_win && !is_ios) {
  58. source_set("message_port_tls_connection") {
  59. sources = [
  60. "message_port_tls_connection.cc",
  61. "message_port_tls_connection.h",
  62. ]
  63. public_deps = [
  64. "//components/cast/message_port",
  65. "//third_party/openscreen/src/platform",
  66. ]
  67. deps = [
  68. "//base",
  69. "//net",
  70. ]
  71. }
  72. }
  73. source_set("unittests") {
  74. testonly = true
  75. sources = [
  76. "tls_client_connection_unittest.cc",
  77. "tls_connection_factory_unittest.cc",
  78. ]
  79. deps = [
  80. ":openscreen_platform_network_service",
  81. "//base/test:test_support",
  82. "//services/network:test_support",
  83. "//testing/gmock",
  84. "//testing/gtest",
  85. ]
  86. if (!is_win && !is_ios) {
  87. sources += [ "message_port_tls_connection_unittest.cc" ]
  88. deps += [ ":message_port_tls_connection" ]
  89. }
  90. }