# Copyright 2014 The Chromium Authors # 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("//remoting/remoting_options.gni") source_set("errors") { sources = [ "errors.h" ] deps = [ "//remoting/base:errors" ] } static_library("transport") { sources = [ "transport.cc", "transport.h", ] deps = [ ":errors", "//base", "//net", "//remoting/base", ] } static_library("protocol") { sources = [ "audio_sample_info.h", "audio_stub.h", "auth_util.cc", "auth_util.h", "authenticator.cc", "authenticator.h", "capability_names.h", "channel_dispatcher_base.cc", "channel_dispatcher_base.h", "chromium_port_allocator_factory.cc", "chromium_port_allocator_factory.h", "chromium_socket_factory.cc", "chromium_socket_factory.h", "client_authentication_config.cc", "client_authentication_config.h", "client_control_dispatcher.cc", "client_control_dispatcher.h", "client_event_dispatcher.cc", "client_event_dispatcher.h", "client_stub.h", "client_video_stats_dispatcher.cc", "client_video_stats_dispatcher.h", "clipboard_echo_filter.cc", "clipboard_echo_filter.h", "clipboard_filter.cc", "clipboard_filter.h", "clipboard_stub.h", "clipboard_thread_proxy.cc", "clipboard_thread_proxy.h", "connection_to_client.h", "connection_to_host.cc", "connection_to_host.h", "coordinate_conversion.cc", "coordinate_conversion.h", "coordinate_converter.cc", "coordinate_converter.h", "credentials_type.h", "data_channel_manager.cc", "data_channel_manager.h", "desktop_capturer.h", "desktop_capturer_proxy.cc", "desktop_capturer_proxy.h", "desktop_capturer_wrapper.cc", "desktop_capturer_wrapper.h", "display_size.cc", "display_size.h", "file_transfer_helpers.cc", "file_transfer_helpers.h", "fractional_input_filter.cc", "fractional_input_filter.h", "frame_consumer.h", "frame_stats.cc", "frame_stats.h", "host_authentication_config.cc", "host_authentication_config.h", "host_control_dispatcher.cc", "host_control_dispatcher.h", "host_event_dispatcher.cc", "host_event_dispatcher.h", "host_stub.h", "host_video_stats_dispatcher.cc", "host_video_stats_dispatcher.h", "ice_config.cc", "ice_config.h", "ice_config_fetcher.h", "ice_config_fetcher_cloud.cc", "ice_config_fetcher_cloud.h", "ice_config_fetcher_corp.cc", "ice_config_fetcher_corp.h", "ice_config_fetcher_default.cc", "ice_config_fetcher_default.h", "input_event_timestamps.cc", "input_event_timestamps.h", "input_event_tracker.cc", "input_event_tracker.h", "input_filter.cc", "input_filter.h", "input_stub.h", "it2me_host_authenticator_factory.cc", "it2me_host_authenticator_factory.h", "jingle_session.cc", "jingle_session.h", "jingle_session_manager.cc", "jingle_session_manager.h", "keyboard_layout_stub.h", "me2me_host_authenticator_factory.cc", "me2me_host_authenticator_factory.h", "message_pipe.h", "message_serialization.h", "microphone_stub.h", "mouse_cursor_monitor.h", "named_message_pipe_handler.cc", "named_message_pipe_handler.h", "negotiating_authenticator_base.cc", "negotiating_authenticator_base.h", "negotiating_client_authenticator.cc", "negotiating_client_authenticator.h", "negotiating_host_authenticator.cc", "negotiating_host_authenticator.h", "network_settings.cc", "network_settings.h", "observing_input_filter.cc", "observing_input_filter.h", "pairing_authenticator_base.cc", "pairing_authenticator_base.h", "pairing_client_authenticator.cc", "pairing_client_authenticator.h", "pairing_host_authenticator.cc", "pairing_host_authenticator.h", "pairing_registry.cc", "pairing_registry.h", "peer_connection_controls.h", "performance_tracker.cc", "performance_tracker.h", "port_allocator.cc", "port_allocator.h", "port_allocator_factory.cc", "port_allocator_factory.h", "rejecting_authenticator.cc", "rejecting_authenticator.h", "sdp_message.cc", "sdp_message.h", "session.h", "session_authz_authenticator.cc", "session_authz_authenticator.h", "session_authz_reauthorizer.cc", "session_authz_reauthorizer.h", "session_manager.h", "session_observer.h", "session_options_provider.h", "session_plugin.h", "socket_util.cc", "socket_util.h", "spake2_authenticator.cc", "spake2_authenticator.h", "stream_packet_processor.h", "stream_packet_socket.cc", "stream_packet_socket.h", "stun_tcp_packet_processor.cc", "stun_tcp_packet_processor.h", "transport_context.cc", "transport_context.h", "validating_authenticator.cc", "validating_authenticator.h", "video_channel_state_observer.h", "video_renderer.h", "video_stats_stub.h", "video_stub.h", "webrtc_audio_fifo_sink_adapter.cc", "webrtc_audio_fifo_sink_adapter.h", "webrtc_audio_module.cc", "webrtc_audio_module.h", "webrtc_audio_sink_adapter.cc", "webrtc_audio_sink_adapter.h", "webrtc_connection_to_host.cc", "webrtc_connection_to_host.h", "webrtc_data_stream_adapter.cc", "webrtc_data_stream_adapter.h", "webrtc_event_log_data.cc", "webrtc_event_log_data.h", "webrtc_transport.cc", "webrtc_transport.h", "webrtc_video_renderer_adapter.cc", "webrtc_video_renderer_adapter.h", ] configs += [ "//build/config:precompiled_headers", "//build/config/compiler:wexit_time_destructors", ] public_deps = [ ":errors", ":transport", "//remoting/proto", "//third_party/webrtc_overrides:webrtc_component", ] deps = [ "//base", "//components/webrtc:net_address_utils", "//components/webrtc:thread_wrapper", "//crypto", "//google_apis", "//net", "//remoting/base", "//remoting/base:authorization", "//remoting/base:logging", "//remoting/base:name_value_map", "//remoting/base:session_policies", "//remoting/proto:internal_structs", "//remoting/proto/google/internal/remoting/cloud/v1alpha:messages", "//remoting/proto/remoting/v1:network_traversal_proto", "//remoting/signaling", "//services/network/public/cpp", "//third_party/abseil-cpp:absl", "//third_party/boringssl", "//third_party/libyuv", "//third_party/webrtc_overrides:webrtc_component", "//ui/events:dom_keycode_converter", ] defines = [] # Must be a subset of the platforms built in //remoting/codec/BUILD.gn if (remoting_enable_h264 && is_win) { defines += [ "USE_H264_ENCODER" ] deps += [ "//media", "//skia", ] } if (enable_remoting_host) { sources += [ "video_stream_event_router.cc", "video_stream_event_router.h", "webrtc_audio_source_adapter.cc", "webrtc_audio_source_adapter.h", "webrtc_audio_stream.cc", "webrtc_audio_stream.h", "webrtc_connection_to_client.cc", "webrtc_connection_to_client.h", "webrtc_frame_scheduler.h", "webrtc_frame_scheduler_constant_rate.cc", "webrtc_frame_scheduler_constant_rate.h", "webrtc_video_encoder_factory.cc", "webrtc_video_encoder_factory.h", "webrtc_video_encoder_wrapper.cc", "webrtc_video_encoder_wrapper.h", "webrtc_video_frame_adapter.cc", "webrtc_video_frame_adapter.h", "webrtc_video_stream.cc", "webrtc_video_stream.h", "webrtc_video_track_source.cc", "webrtc_video_track_source.h", ] deps += [ "//media", "//remoting/codec:encoder", ] } } static_library("test_support") { testonly = true sources = [ "fake_authenticator.cc", "fake_authenticator.h", "fake_connection_to_host.cc", "fake_connection_to_host.h", "fake_message_pipe.cc", "fake_message_pipe.h", "fake_message_pipe_wrapper.cc", "fake_message_pipe_wrapper.h", "fake_session.cc", "fake_session.h", "fake_video_renderer.cc", "fake_video_renderer.h", "protocol_mock_objects.cc", "protocol_mock_objects.h", ] if (enable_remoting_host) { sources += [ "fake_audio_source.cc", "fake_audio_source.h", "fake_connection_to_client.cc", "fake_connection_to_client.h", "fake_desktop_capturer.cc", "fake_desktop_capturer.h", "fake_webrtc_audio_classes.cc", "fake_webrtc_audio_classes.h", ] } public_deps = [ ":protocol", "//testing/gmock", ] deps = [ "//base", "//net", "//net/traffic_annotation", "//net/traffic_annotation:test_support", "//remoting/base", "//remoting/base:errors", "//remoting/base:session_policies", "//remoting/codec:encoder", "//remoting/signaling", "//testing/gtest", ] } source_set("unit_tests") { testonly = true sources = [ "authenticator_test_base.cc", "authenticator_test_base.h", "chromium_socket_factory_unittest.cc", "clipboard_echo_filter_unittest.cc", "clipboard_filter_unittest.cc", "coordinate_conversion_test.cc", "coordinate_converter_unittest.cc", "data_channel_manager_unittest.cc", "fractional_input_filter_unittest.cc", "frame_stats_unittest.cc", "ice_config_fetcher_cloud_unittest.cc", "ice_config_fetcher_default_unittest.cc", "ice_config_unittest.cc", "input_event_tracker_unittest.cc", "input_filter_unittest.cc", "jingle_session_unittest.cc", "negotiating_authenticator_unittest.cc", "network_settings_unittest.cc", "pairing_registry_unittest.cc", "sdp_message_unittest.cc", "session_authz_authenticator_unittest.cc", "session_authz_reauthorizer_unittest.cc", "spake2_authenticator_unittest.cc", "stream_packet_socket_unittest.cc", "validating_authenticator_unittest.cc", "webrtc_event_log_data_unittest.cc", "webrtc_video_renderer_adapter_unittest.cc", ] if (enable_remoting_host) { sources += [ "connection_unittest.cc", "webrtc_audio_fifo_sink_adapter_unittest.cc", "webrtc_audio_source_adapter_unittest.cc", "webrtc_frame_scheduler_unittest.cc", "webrtc_transport_unittest.cc", "webrtc_video_encoder_wrapper_unittest.cc", "webrtc_video_frame_adapter_unittest.cc", "webrtc_video_track_source_unittest.cc", ] } deps = [ ":test_support", "//base", "//components/webrtc:thread_wrapper", "//net:test_support", "//remoting/base", "//remoting/base:session_policies", "//remoting/base:test_support", "//remoting/codec:encoder", "//remoting/proto:internal_structs", "//remoting/proto/google/internal/remoting/cloud/v1alpha:messages", "//remoting/proto/remoting/v1:network_traversal_proto", "//remoting/signaling:test_support", "//services/network/public/cpp", "//testing/gmock", "//testing/gtest", "//third_party/webrtc_overrides:webrtc_component", ] # TODO(crbug.com/40031409): Fix code that adds exit-time destructors and # enable the diagnostic by removing this line. configs += [ "//build/config/compiler:no_exit_time_destructors" ] }