| # Copyright 2020 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//testing/test.gni") |
| |
| visibility = [ ":*" ] |
| |
| # MessagePort cannot be used on Windows due to intersection of its PostMessage |
| # method with a macro of the same name, so hide the targets that use it and all |
| # that depend on it behind a platform check. |
| # TODO(crbug.com/1357085): Resolve this and remove this exception. |
| if (!is_win) { |
| # TODO(crbug.com/1207718): Remove cast_message_port_impl code from this |
| # component and replace with a more general interface. |
| # TODO(crbug.com/1208195): Move code to correct place with respect to the |
| # /public folder to only expose publicly needed headers. |
| source_set("core") { |
| public = [ "cast_message_port_impl.h" ] |
| sources = [ "cast_message_port_impl.cc" ] |
| public_deps = [ |
| "//base", |
| "//components/cast/message_port", |
| "//third_party/openscreen/src/cast/common:public", |
| ] |
| deps = [ |
| "//components/cast_streaming/common:message_serialization", |
| "//third_party/openscreen/src/platform:base", |
| ] |
| friend = [ ":unit_tests" ] |
| } |
| } |
| |
| source_set("network_context") { |
| visibility += [ "*" ] |
| public = [ "public/network_context_getter.h" ] |
| sources = [ "network_context_getter.cc" ] |
| public_deps = [ "//base" ] |
| deps = [ "//components/openscreen_platform" ] |
| } |
| |
| source_set("browser") { |
| visibility += [ "*" ] |
| public = [ |
| "public/receiver_config.h", |
| "public/receiver_session.h", |
| ] |
| sources = [ |
| "demuxer_stream_client.h", |
| "demuxer_stream_data_provider.h", |
| "playback_command_dispatcher.cc", |
| "playback_command_dispatcher.h", |
| "receiver_config.cc", |
| "remoting_session_client.h", |
| "renderer_control_multiplexer.cc", |
| "renderer_control_multiplexer.h", |
| "renderer_rpc_call_translator.cc", |
| "renderer_rpc_call_translator.h", |
| "rpc_demuxer_stream_handler.cc", |
| "rpc_demuxer_stream_handler.h", |
| "rpc_initialization_call_handler_base.cc", |
| "rpc_initialization_call_handler_base.h", |
| "streaming_initialization_info.cc", |
| "streaming_initialization_info.h", |
| ] |
| public_deps = [ |
| ":network_context", |
| "//base", |
| "//components/cast_streaming/public/mojom", |
| "//mojo/public/cpp/bindings", |
| |
| # TODO(crbug.com/1220176): Move this deps elsewhere once include is removed. |
| "//third_party/openscreen/src/cast/streaming:receiver", |
| ] |
| deps = [ |
| "//base", |
| "//components/cast_streaming/public:demuxer_stream_traits", |
| "//components/cast_streaming/public:remoting_utils", |
| "//components/cast_streaming/public/mojom", |
| "//media", |
| "//media/mojo/common", |
| "//media/mojo/mojom", |
| "//mojo/public/cpp/system", |
| "//third_party/openscreen/src/cast/streaming:receiver", |
| ] |
| |
| if (!is_win) { |
| sources += [ |
| "cast_streaming_session.cc", |
| "cast_streaming_session.h", |
| "receiver_config_conversions.cc", |
| "receiver_config_conversions.h", |
| "receiver_session_impl.cc", |
| "receiver_session_impl.h", |
| "renderer_controller_config.cc", |
| "renderer_controller_config.h", |
| "stream_consumer.cc", |
| "stream_consumer.h", |
| ] |
| deps += [ |
| ":core", |
| ":network_context", |
| "//components/cast/message_port", |
| "//components/cast_streaming/public", |
| "//components/cast_streaming/public:config_conversions", |
| "//components/openscreen_platform", |
| "//mojo/public/cpp/bindings", |
| "//ui/gfx/geometry", |
| ] |
| } |
| |
| friend = [ ":unit_tests" ] |
| } |
| |
| # TODO(crbug.com/1207721): Add more unit tests for code in this directory. |
| source_set("unit_tests") { |
| testonly = true |
| visibility += [ "//components/cast_streaming:unit_tests" ] |
| public = [] |
| sources = [ |
| "demuxer_stream_data_provider_unittest.cc", |
| "rpc_demuxer_stream_handler_unittests.cc", |
| ] |
| deps = [ |
| ":browser", |
| "//base", |
| "//base/test:test_support", |
| "//media", |
| "//media/mojo/common", |
| "//mojo/public/cpp/bindings", |
| "//testing/gtest", |
| "//third_party/openscreen/src/cast/streaming:common", |
| ] |
| |
| if (!is_win) { |
| deps += [ |
| ":core", |
| "//components/cast/message_port", |
| "//components/cast/message_port:test_message_port_receiver", |
| "//components/cast_streaming/common:message_serialization", |
| ] |
| sources += [ "cast_message_port_impl_unittest.cc" ] |
| } |
| } |