| # Copyright 2016 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//media/media_options.gni") |
| import("//testing/test.gni") |
| import("//third_party/protobuf/proto_library.gni") |
| |
| # This target is separate from "remoting" because this code is shared by the |
| # receiver implementation (currently outside of the Chromium project). |
| source_set("rpc") { |
| sources = [ |
| "proto_enum_utils.cc", |
| "proto_enum_utils.h", |
| "proto_utils.cc", |
| "proto_utils.h", |
| ] |
| |
| public_configs = |
| [ "//third_party/openscreen/src/build:openscreen_include_dirs" ] |
| |
| deps = [ |
| "//base", |
| "//components/openscreen_platform:openscreen_platform", |
| "//components/openscreen_platform:openscreen_platform_network_service", |
| "//media", |
| ] |
| |
| public_deps = [ |
| "//third_party/openscreen/src/cast/streaming:common", |
| "//third_party/openscreen/src/cast/streaming:remoting_proto", |
| ] |
| } |
| |
| source_set("remoting_sender") { |
| sources = [ |
| "courier_renderer_factory.cc", |
| "courier_renderer_factory.h", |
| "metrics.cc", |
| "metrics.h", |
| "renderer_controller.cc", |
| "renderer_controller.h", |
| ] |
| |
| deps = [ |
| "//base", |
| "//media", |
| "//media/mojo/common", |
| "//media/mojo/mojom:remoting", |
| "//mojo/public/cpp/bindings", |
| "//ui/gfx", |
| "//url", |
| ] |
| |
| public_deps = [] |
| |
| if (enable_media_remoting_rpc) { |
| sources += [ |
| "courier_renderer.cc", |
| "courier_renderer.h", |
| "demuxer_stream_adapter.cc", |
| "demuxer_stream_adapter.h", |
| "triggers.h", |
| ] |
| |
| # Consumers of the CourierRenderer implicitly take a dependency on the |
| # generated remoting.pb.h file. |
| public_deps += [ ":rpc" ] |
| } |
| } |
| |
| source_set("remoting_constants") { |
| sources = [ "remoting_constants.h" ] |
| } |
| |
| source_set("remoting_renderer") { |
| sources = [ |
| "receiver.cc", |
| "receiver.h", |
| "receiver_controller.cc", |
| "receiver_controller.h", |
| "remoting_renderer_factory.cc", |
| "remoting_renderer_factory.h", |
| "stream_provider.cc", |
| "stream_provider.h", |
| ] |
| |
| deps = [ |
| ":remoting_constants", |
| ":rpc", |
| "//media/mojo/common:common", |
| "//media/mojo/mojom:remoting", |
| ] |
| |
| # Consumers of the ReceiverController implicitly take a dependency on the |
| # generated remoting.pb.h file. |
| public_deps = [ ":rpc" ] |
| } |
| |
| source_set("media_remoting_tests") { |
| testonly = true |
| sources = [ |
| "fake_remoter.cc", |
| "fake_remoter.h", |
| "mock_receiver_controller.cc", |
| "mock_receiver_controller.h", |
| "receiver_unittest.cc", |
| "renderer_controller_unittest.cc", |
| "stream_provider_unittest.cc", |
| "test_utils.cc", |
| "test_utils.h", |
| ] |
| |
| deps = [ |
| ":remoting_renderer", |
| ":remoting_sender", |
| ":rpc", |
| "//base", |
| "//base/test:test_support", |
| "//media:test_support", |
| "//media/mojo/common", |
| "//media/mojo/mojom:remoting", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//url", |
| ] |
| |
| if (enable_media_remoting_rpc) { |
| sources += [ |
| "courier_renderer_unittest.cc", |
| "demuxer_stream_adapter_unittest.cc", |
| "end2end_test_renderer.cc", |
| "end2end_test_renderer.h", |
| "fake_media_resource.cc", |
| "fake_media_resource.h", |
| "integration_test.cc", |
| "metrics_unittest.cc", |
| "proto_utils_unittest.cc", |
| ] |
| |
| deps += [ |
| ":rpc", |
| "//media/test:pipeline_integration_test_base", |
| "//services/service_manager/public/cpp:cpp", |
| "//ui/gfx:test_support", |
| "//ui/gfx/geometry", |
| ] |
| } |
| } |
| |
| test("media_remoting_unittests") { |
| data = [ "//media/test/data/" ] |
| deps = [ |
| ":media_remoting_tests", |
| "//media/test:run_all_unittests", |
| ] |
| } |