| # 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("//build/config/chromeos/ui_mode.gni") |
| import("//build/util/process_version.gni") |
| import("//remoting/build/config/remoting_logging.gni") |
| import("//testing/libfuzzer/fuzzer_test.gni") |
| import("//third_party/protobuf/proto_library.gni") |
| |
| proto_library("protobuf_http_client_messages_proto") { |
| sources = [ "protobuf_http_client_messages.proto" ] |
| } |
| |
| process_version("remoting_base_version") { |
| sources = [ "//chrome/VERSION" ] |
| template_file = "//remoting/base/version.h.in" |
| output = "$target_gen_dir/version.h" |
| } |
| |
| source_set("base") { |
| sources = [ |
| "auto_thread.cc", |
| "auto_thread.h", |
| "auto_thread_task_runner.cc", |
| "auto_thread_task_runner.h", |
| "buffered_socket_writer.cc", |
| "buffered_socket_writer.h", |
| "capabilities.cc", |
| "capabilities.h", |
| "chromoting_event.cc", |
| "chromoting_event.h", |
| "compound_buffer.cc", |
| "compound_buffer.h", |
| "constants.cc", |
| "constants.h", |
| "cpu_utils.cc", |
| "cpu_utils.h", |
| "directory_service_client.cc", |
| "directory_service_client.h", |
| "leaky_bucket.cc", |
| "leaky_bucket.h", |
| "mojo_util.cc", |
| "mojo_util.h", |
| "name_value_map.h", |
| "protobuf_http_client.cc", |
| "protobuf_http_client.h", |
| "protobuf_http_request.cc", |
| "protobuf_http_request.h", |
| "protobuf_http_request_base.cc", |
| "protobuf_http_request_base.h", |
| "protobuf_http_request_config.cc", |
| "protobuf_http_request_config.h", |
| "protobuf_http_status.cc", |
| "protobuf_http_status.h", |
| "protobuf_http_stream_parser.cc", |
| "protobuf_http_stream_parser.h", |
| "protobuf_http_stream_request.cc", |
| "protobuf_http_stream_request.h", |
| "queued_task_poster.cc", |
| "queued_task_poster.h", |
| "rate_counter.cc", |
| "rate_counter.h", |
| "result.h", |
| "rsa_key_pair.cc", |
| "rsa_key_pair.h", |
| "running_samples.cc", |
| "running_samples.h", |
| "scoped_protobuf_http_request.cc", |
| "scoped_protobuf_http_request.h", |
| "service_urls.cc", |
| "service_urls.h", |
| "session_options.cc", |
| "session_options.h", |
| "socket_reader.cc", |
| "socket_reader.h", |
| "task_util.h", |
| "telemetry_log_writer.cc", |
| "telemetry_log_writer.h", |
| "typed_buffer.h", |
| "url_request_context_getter.cc", |
| "url_request_context_getter.h", |
| "util.cc", |
| "util.h", |
| "vlog_net_log.cc", |
| "vlog_net_log.h", |
| "weighted_samples.cc", |
| "weighted_samples.h", |
| ] |
| |
| configs += [ |
| "//build/config/compiler:wexit_time_destructors", |
| "//remoting/build/config:version", |
| ] |
| |
| public_deps = [ |
| "//base", |
| "//net", |
| "//remoting/proto", |
| "//remoting/proto/remoting/v1:chromoting_event_proto", |
| "//third_party/protobuf:protobuf_lite", |
| ] |
| deps = [ |
| ":authorization", |
| ":protobuf_http_client_messages_proto", |
| "//base/third_party/dynamic_annotations", |
| "//build:chromeos_buildflags", |
| "//google_apis", |
| "//remoting/proto/remoting/v1:directory_proto", |
| "//remoting/proto/remoting/v1:telemetry_messages", |
| "//services/network/public/cpp", |
| "//services/network/public/mojom", |
| "//third_party/libvpx", |
| "//third_party/libyuv", |
| "//third_party/webrtc_overrides:webrtc_component", |
| "//url", |
| ] |
| |
| if (is_win) { |
| sources += [ "scoped_sc_handle_win.h" ] |
| } else if (is_linux || is_chromeos) { |
| sources += [ |
| "file_path_util_linux.cc", |
| "file_path_util_linux.h", |
| ] |
| } |
| } |
| |
| source_set("authorization") { |
| sources = [ |
| "gaia_oauth_client.cc", |
| "gaia_oauth_client.h", |
| "oauth_client.h", |
| "oauth_token_getter.cc", |
| "oauth_token_getter.h", |
| "oauth_token_getter_impl.cc", |
| "oauth_token_getter_impl.h", |
| "oauth_token_getter_proxy.cc", |
| "oauth_token_getter_proxy.h", |
| "passthrough_oauth_token_getter.cc", |
| "passthrough_oauth_token_getter.h", |
| ] |
| |
| configs += [ |
| "//build/config/compiler:wexit_time_destructors", |
| "//remoting/build/config:version", |
| ] |
| |
| deps = [ |
| ":logging", |
| "//services/network/public/cpp", |
| ] |
| |
| public_deps = [ |
| "//base", |
| "//google_apis", |
| "//net", |
| ] |
| } |
| |
| source_set("breakpad") { |
| sources = [ "breakpad.h" ] |
| |
| configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| |
| deps = [ "//base" ] |
| |
| if (is_linux || is_chromeos) { |
| sources += [ |
| "breakpad_linux.cc", |
| "breakpad_utils_linux.cc", |
| "breakpad_utils_linux.h", |
| ] |
| deps += [ |
| ":remoting_base_version", |
| "//third_party/breakpad:client", |
| ] |
| } |
| |
| if (is_mac) { |
| sources += [ "breakpad_mac.mm" ] |
| } |
| |
| if (is_win) { |
| sources += [ "breakpad_win.cc" ] |
| deps += [ "//third_party/breakpad:breakpad_handler" ] |
| } |
| } |
| |
| source_set("logging") { |
| public = [ "logging.h" ] |
| |
| sources = [ |
| "logging.cc", |
| "logging_internal.h", |
| ] |
| |
| if (is_linux || is_chromeos) { |
| sources += [ "logging_linux.cc" ] |
| } |
| |
| if (is_mac) { |
| sources += [ "logging_mac.cc" ] |
| } |
| |
| if (is_win) { |
| sources += [ "logging_win.cc" ] |
| } |
| |
| if (remoting_webrtc_verbose_logging) { |
| defines = [ "WEBRTC_VERBOSE_LOGGING" ] |
| } |
| |
| deps = [ "//base" ] |
| } |
| |
| source_set("settings") { |
| sources = [ |
| "host_settings.cc", |
| "host_settings.h", |
| "user_settings.cc", |
| "user_settings.h", |
| ] |
| deps = [ |
| ":logging", |
| "//base", |
| "//remoting/base", |
| ] |
| |
| if (is_win) { |
| sources += [ |
| "host_settings_win.cc", |
| "host_settings_win.h", |
| "user_settings_win.cc", |
| "user_settings_win.h", |
| ] |
| } else if (is_mac || is_linux) { |
| sources += [ |
| "file_host_settings.cc", |
| "file_host_settings.h", |
| ] |
| if (is_linux) { |
| sources += [ "file_host_settings_linux.cc" ] |
| } else if (is_mac) { |
| sources += [ "file_host_settings_mac.cc" ] |
| } |
| } |
| } |
| |
| static_library("test_support") { |
| testonly = true |
| |
| sources = [ |
| "fake_oauth_token_getter.cc", |
| "fake_oauth_token_getter.h", |
| "mock_oauth_client.cc", |
| "mock_oauth_client.h", |
| "protobuf_http_test_responder.cc", |
| "protobuf_http_test_responder.h", |
| "test_rsa_key_pair.h", |
| ] |
| |
| deps = [ |
| ":logging", |
| ":protobuf_http_client_messages_proto", |
| "//base/test:test_support", |
| "//remoting/proto", |
| "//services/network:test_support", |
| ] |
| public_deps = [ |
| ":authorization", |
| ":base", |
| ":breakpad", |
| "//base", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/protobuf:protobuf_lite", |
| ] |
| } |
| |
| proto_library("test_proto") { |
| testonly = true |
| |
| sources = [ "protobuf_http_client_test_messages.proto" ] |
| } |
| |
| source_set("run_all_unittests") { |
| testonly = true |
| |
| sources = [ "run_all_unittests.cc" ] |
| if (is_chromeos_ash) { |
| sources += [ |
| "chromeos_remoting_test_suite.cc", |
| "chromeos_remoting_test_suite.h", |
| ] |
| } |
| deps = [ |
| ":base", |
| "//base", |
| "//base/test:test_support", |
| "//mojo/core/embedder", |
| "//testing/gtest", |
| ] |
| if (is_chromeos_ash) { |
| deps += [ |
| "//ui/aura:test_support", |
| "//ui/gl:test_support", |
| ] |
| data = [ "$root_out_dir/locales/en-US.pak" ] |
| data_deps = [ "//ui/resources:ui_test_pak_data" ] |
| } |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| |
| sources = [ |
| "auto_thread_task_runner_unittest.cc", |
| "auto_thread_unittest.cc", |
| "buffered_socket_writer_unittest.cc", |
| "capabilities_unittest.cc", |
| "compound_buffer_unittest.cc", |
| "leaky_bucket_unittest.cc", |
| "oauth_token_getter_proxy_unittest.cc", |
| "protobuf_http_client_unittest.cc", |
| "protobuf_http_stream_parser_unittest.cc", |
| "queued_task_poster_unittest.cc", |
| "rate_counter_unittest.cc", |
| "result_unittest.cc", |
| "rsa_key_pair_unittest.cc", |
| "running_samples_unittest.cc", |
| "session_options_unittest.cc", |
| "telemetry_log_writer_unittest.cc", |
| "typed_buffer_unittest.cc", |
| "util_unittest.cc", |
| "weighted_samples_unittest.cc", |
| ] |
| |
| deps = [ |
| ":logging", |
| ":protobuf_http_client_messages_proto", |
| ":run_all_unittests", |
| ":test_proto", |
| ":test_support", |
| "//base", |
| "//net:test_support", |
| "//remoting/proto/remoting/v1:telemetry_messages", |
| "//services/network:test_support", |
| "//services/network/public/cpp", |
| "//third_party/libyuv", |
| "//third_party/webrtc_overrides:webrtc_component", |
| ] |
| |
| if (is_win || is_chromeos_ash) { |
| deps += [ "//third_party/breakpad:client" ] |
| } |
| |
| if (is_win) { |
| sources += [ "breakpad_win_unittest.cc" ] |
| deps += [ "//third_party/breakpad:breakpad_handler" ] |
| libs = [ "rpcrt4.lib" ] # For UuidCreate in breakpad_win_unittest.cc. |
| } |
| } |
| |
| fuzzer_test("remoting_protobuf_http_stream_parser_fuzzer") { |
| sources = [ "protobuf_http_stream_parser_fuzzer.cc" ] |
| deps = [ |
| ":base", |
| "//base", |
| "//base/test:test_support", |
| "//third_party/protobuf:protobuf_lite", |
| ] |
| } |