# Copyright 2014 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("//build/config/features.gni") import("//remoting/remoting_options.gni") import("//media/media_options.gni") static_library("protocol") { sources = [ "audio_decode_scheduler.cc", "audio_decode_scheduler.h", "audio_reader.cc", "audio_reader.h", "audio_stub.h", "auth_util.cc", "auth_util.h", "authenticator.cc", "authenticator.h", "bandwidth_estimator.h", "capability_names.h", "channel_authenticator.h", "channel_dispatcher_base.cc", "channel_dispatcher_base.h", "channel_multiplexer.cc", "channel_multiplexer.h", "channel_socket_adapter.cc", "channel_socket_adapter.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_dispatcher.cc", "client_video_dispatcher.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", "content_description.cc", "content_description.h", "data_channel_manager.cc", "data_channel_manager.h", "datagram_channel_factory.h", "errors.cc", "errors.h", "frame_consumer.h", "frame_stats.cc", "frame_stats.h", "host_control_dispatcher.cc", "host_control_dispatcher.h", "host_event_dispatcher.cc", "host_event_dispatcher.h", "host_stub.h", "host_video_dispatcher.cc", "host_video_dispatcher.h", "host_video_stats_dispatcher.cc", "host_video_stats_dispatcher.h", "http_ice_config_request.cc", "http_ice_config_request.h", "ice_config.cc", "ice_config.h", "ice_config_request.h", "ice_connection_to_host.cc", "ice_connection_to_host.h", "ice_transport.cc", "ice_transport.h", "ice_transport_channel.cc", "ice_transport_channel.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_info_request.cc", "jingle_info_request.h", "jingle_messages.cc", "jingle_messages.h", "jingle_session.cc", "jingle_session.h", "jingle_session_manager.cc", "jingle_session_manager.h", "me2me_host_authenticator_factory.cc", "me2me_host_authenticator_factory.h", "message_decoder.cc", "message_decoder.h", "message_pipe.h", "message_reader.cc", "message_reader.h", "message_serialization.cc", "message_serialization.h", "monitored_video_stub.cc", "monitored_video_stub.h", "mouse_input_filter.cc", "mouse_input_filter.h", "named_message_pipe_handler.cc", "named_message_pipe_handler.h", "native_ip_synthesizer.cc", "native_ip_synthesizer.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.h", "p2p_datagram_socket.h", "p2p_stream_socket.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", "performance_tracker.cc", "performance_tracker.h", "port_allocator.cc", "port_allocator.h", "port_allocator_factory.h", "port_range.cc", "port_range.h", "process_stats_stub.h", "pseudotcp_adapter.cc", "pseudotcp_adapter.h", "pseudotcp_channel_factory.cc", "pseudotcp_channel_factory.h", "rejecting_authenticator.cc", "rejecting_authenticator.h", "sdp_message.cc", "sdp_message.h", "secure_channel_factory.cc", "secure_channel_factory.h", "session.h", "session_config.cc", "session_config.h", "session_manager.h", "session_plugin.h", "socket_util.cc", "socket_util.h", "spake2_authenticator.cc", "spake2_authenticator.h", "ssl_hmac_channel_authenticator.cc", "ssl_hmac_channel_authenticator.h", "stream_channel_factory.h", "stream_message_pipe_adapter.cc", "stream_message_pipe_adapter.h", "third_party_authenticator_base.cc", "third_party_authenticator_base.h", "third_party_client_authenticator.cc", "third_party_client_authenticator.h", "third_party_host_authenticator.cc", "third_party_host_authenticator.h", "token_validator.h", "transport.cc", "transport.h", "transport_context.cc", "transport_context.h", "v2_authenticator.cc", "v2_authenticator.h", "validating_authenticator.cc", "validating_authenticator.h", "video_channel_state_observer.h", "video_renderer.h", "video_stats_stub.h", "video_stub.h", "webrtc_bandwidth_estimator.cc", "webrtc_bandwidth_estimator.h", ] configs += [ "//build/config:precompiled_headers", "//build/config/compiler:no_size_t_to_int_warning", "//build/config/compiler:wexit_time_destructors", ] public_deps = [ "//remoting/proto", "//third_party/webrtc_overrides", ] deps = [ "//base", "//crypto", "//jingle:jingle_glue", "//net", "//remoting/base", "//remoting/codec:decoder", "//remoting/signaling", "//third_party/boringssl", "//third_party/libyuv", ] defines = [] if (!is_nacl) { # This condition needs to match with //remoting/codec/BUILD.gn if (is_win || is_linux) { defines += [ "USE_H264_ENCODER" ] deps += [ "//media", "//skia", ] } sources += [ "chromium_port_allocator_factory.cc", "chromium_port_allocator_factory.h", "chromium_socket_factory.cc", "chromium_socket_factory.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_dummy_video_capturer.cc", "webrtc_dummy_video_capturer.h", "webrtc_dummy_video_encoder.cc", "webrtc_dummy_video_encoder.h", "webrtc_transport.cc", "webrtc_transport.h", "webrtc_video_renderer_adapter.cc", "webrtc_video_renderer_adapter.h", ] if (enable_remoting_host) { sources += [ "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_simple.cc", "webrtc_frame_scheduler_simple.h", "webrtc_video_stream.cc", "webrtc_video_stream.h", ] } deps += [ "//third_party/webrtc/api/audio_codecs:audio_codecs_api", "//third_party/webrtc/api/audio_codecs/opus:audio_decoder_opus", "//third_party/webrtc/api/audio_codecs/opus:audio_encoder_opus", "//third_party/webrtc/api/video_codecs:builtin_video_decoder_factory", "//third_party/webrtc_overrides:init_webrtc", ] } if (enable_remoting_host) { sources += [ "audio_pump.cc", "audio_pump.h", "audio_writer.cc", "audio_writer.h", "capture_scheduler.cc", "capture_scheduler.h", "ice_connection_to_client.cc", "ice_connection_to_client.h", "video_frame_pump.cc", "video_frame_pump.h", ] deps += [ "//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_datagram_socket.cc", "fake_datagram_socket.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_stream_socket.cc", "fake_stream_socket.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", ] } public_deps = [ ":protocol", "//testing/gmock", ] } source_set("unit_tests") { testonly = true sources = [ "audio_decode_scheduler_unittest.cc", "authenticator_test_base.cc", "authenticator_test_base.h", "channel_multiplexer_unittest.cc", "channel_socket_adapter_unittest.cc", "chromium_socket_factory_unittest.cc", "client_video_dispatcher_unittest.cc", "clipboard_echo_filter_unittest.cc", "clipboard_filter_unittest.cc", "connection_tester.cc", "connection_tester.h", "content_description_unittest.cc", "data_channel_manager_unittest.cc", "http_ice_config_request_unittest.cc", "ice_config_unittest.cc", "ice_transport_unittest.cc", "input_event_tracker_unittest.cc", "input_filter_unittest.cc", "jingle_messages_unittest.cc", "jingle_session_unittest.cc", "message_decoder_unittest.cc", "message_reader_unittest.cc", "monitored_video_stub_unittest.cc", "mouse_input_filter_unittest.cc", "negotiating_authenticator_unittest.cc", "pairing_registry_unittest.cc", "port_range_unittest.cc", "ppapi_module_stub.cc", "pseudotcp_adapter_unittest.cc", "sdp_message_unittest.cc", "session_config_unittest.cc", "spake2_authenticator_unittest.cc", "ssl_hmac_channel_authenticator_unittest.cc", "third_party_authenticator_unittest.cc", "v2_authenticator_unittest.cc", "validating_authenticator_unittest.cc", "webrtc_transport_unittest.cc", ] if (enable_remoting_host) { sources += [ "audio_pump_unittest.cc", "capture_scheduler_unittest.cc", "connection_unittest.cc", "video_frame_pump_unittest.cc", "webrtc_audio_source_adapter_unittest.cc", "webrtc_frame_scheduler_unittest.cc", ] } deps = [ ":test_support", "//net:test_support", "//testing/gmock", "//testing/gtest", ] }