| # 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/chromeos/ui_mode.gni") |
| import("//build/util/process_version.gni") |
| import("//remoting/build/config/remoting_build.gni") |
| import("//remoting/build/config/remoting_logging.gni") |
| |
| group("all_tests") { |
| testonly = true |
| |
| deps = [ ":unit_tests" ] |
| } |
| |
| group("all") { |
| testonly = true |
| |
| deps = [ ":host" ] |
| if (enable_me2me_host) { |
| deps += [ "//remoting/host:remoting_me2me_host" ] |
| } |
| |
| if (is_chrome_branded) { |
| deps += [ ":remoting_host_branded" ] |
| } |
| |
| if (!is_chromeos && !is_android && !is_ios) { |
| deps += [ |
| "//remoting/host:remoting_native_messaging_host", |
| "//remoting/host:remoting_native_messaging_manifests", |
| "//remoting/host:remoting_start_host", |
| "//remoting/host/it2me:remote_assistance_host", |
| "//remoting/host/webauthn:remote_webauthn", |
| ] |
| |
| if (enable_me2me_host && (is_linux || is_win)) { |
| deps += [ "//remoting/host/remote_open_url" ] |
| } |
| } |
| } |
| |
| process_version("remoting_version") { |
| template_file = "//remoting/host/version.h.in" |
| sources = [ branding_path ] |
| output = "$target_gen_dir/version.h" |
| } |
| |
| source_set("host") { |
| public_deps = [ |
| ":common", |
| "//remoting/host/base", |
| ] |
| deps = [ "//remoting/host/file_transfer" ] |
| } |
| |
| source_set("host_main_headers") { |
| visibility = [ |
| ":*", |
| "//remoting/host/it2me:main_headers", |
| "//remoting/host/mac:remoting_native_messaging_host", |
| "//remoting/host/mac:remoting_native_messaging_host_executable", |
| "//remoting/host/remote_open_url:remote_open_url_main_headers", |
| "//remoting/host/security_key:remote_security_key_main_headers", |
| "//remoting/host/setup:native_messaging_host_main_headers", |
| "//remoting/host/setup:start_host_main_headers", |
| "//remoting/host/webauthn:remote_webauthn_main_headers", |
| "//remoting/host/win:remoting_console", |
| "//remoting/host/win:remoting_core", |
| "//remoting/host/win:remoting_desktop", |
| "//remoting/host/win:remoting_me2me_host", |
| ] |
| sources = [ |
| "host_export.h", |
| "host_main.h", |
| ] |
| } |
| |
| source_set("common_headers") { |
| visibility = [ "//remoting/host/*" ] |
| sources = [ |
| "action_executor.h", |
| "audio_capturer.h", |
| "audio_silence_detector.h", |
| "audio_volume_filter.h", |
| "basic_desktop_environment.h", |
| "chromoting_messages.h", |
| "chromoting_param_traits.h", |
| "desktop_and_cursor_conditional_composer.h", |
| "desktop_environment.h", |
| "evaluate_capability.h", |
| "input_injector.h", |
| "sas_injector.h", |
| "worker_process_ipc_delegate.h", |
| ] |
| if (!is_chromeos_ash) { |
| sources += [ "me2me_desktop_environment.h" ] |
| } |
| deps = [ |
| "//ipc", |
| "//remoting/base", |
| "//remoting/host/base", |
| "//remoting/protocol", |
| ] |
| } |
| |
| source_set("ipc_constants") { |
| sources = [ |
| "ipc_constants.cc", |
| "ipc_constants.h", |
| ] |
| deps = [ |
| "//base", |
| "//mojo/public/cpp/platform", |
| "//remoting/host/mojo_ipc", |
| ] |
| } |
| |
| source_set("chromoting_host_services_client") { |
| sources = [ |
| "chromoting_host_services_client.cc", |
| "chromoting_host_services_client.h", |
| "chromoting_host_services_provider.h", |
| ] |
| deps = [ |
| ":ipc_constants", |
| "//base", |
| "//mojo/public/cpp/platform", |
| "//remoting/host/mojom", |
| ] |
| if (is_win) { |
| deps += [ "//remoting/host/win:acl_util" ] |
| } |
| } |
| |
| # Split up from common to avoid circular dependency. |
| source_set("client_session_control") { |
| sources = [ "client_session_control.h" ] |
| |
| deps = [ |
| "//remoting/protocol", |
| "//ui/events:events", |
| ] |
| } |
| |
| source_set("clipboard") { |
| sources = [ "clipboard.h" ] |
| |
| deps = [ |
| "//base", |
| "//remoting/base:base", |
| "//remoting/host/base", |
| "//remoting/proto", |
| "//remoting/protocol", |
| ] |
| |
| if (remoting_use_x11) { |
| sources += [ "clipboard_x11.cc" ] |
| |
| deps += [ |
| "//remoting/host/linux:x11", |
| "//ui/gfx/x", |
| ] |
| } |
| |
| if (is_mac) { |
| sources += [ "clipboard_mac.mm" ] |
| } |
| |
| if (is_win) { |
| sources += [ "clipboard_win.cc" ] |
| } |
| } |
| |
| source_set("settings") { |
| sources = [ |
| "host_setting_keys.h", |
| "user_setting_keys.h", |
| ] |
| public_deps = [ "//remoting/base:settings" ] |
| } |
| |
| source_set("host_extension") { |
| sources = [ |
| "client_session_details.h", |
| "host_extension.h", |
| "host_extension_session.h", |
| ] |
| } |
| |
| source_set("resources") { |
| sources = [ "resources.h" ] |
| deps = [ |
| "//base", |
| "//ui/base", |
| ] |
| |
| if (is_linux || is_chromeos) { |
| sources += [ "resources_linux.cc" ] |
| } |
| |
| if (is_mac) { |
| sources += [ "resources_mac.cc" ] |
| } |
| |
| if (is_win) { |
| sources += [ "resources_win.cc" ] |
| } |
| } |
| |
| # This must be a static library instead of a source set because |
| # remoting_unittests requires that remoting_me2me_host.cc not be pulled in, |
| # which in turn depends on remoting_me2me_host_static which isn't part of that |
| # build. |
| # |
| # TODO fix this, successful builds should not depend on static libraries |
| # stripping code. |
| static_library("common") { |
| sources = [ |
| "action_executor.cc", |
| "action_message_handler.cc", |
| "action_message_handler.h", |
| "audio_capturer.cc", |
| "audio_silence_detector.cc", |
| "audio_volume_filter.cc", |
| "backoff_timer.cc", |
| "backoff_timer.h", |
| "basic_desktop_environment.cc", |
| "branding.cc", |
| "branding.h", |
| "chromoting_host.cc", |
| "chromoting_host.h", |
| "chromoting_host_context.cc", |
| "chromoting_host_context.h", |
| "chromoting_messages.cc", |
| "chromoting_param_traits.cc", |
| "chromoting_param_traits_impl.h", |
| "client_session.cc", |
| "client_session.h", |
| "client_session_events.h", |
| "config_file_watcher.cc", |
| "config_file_watcher.h", |
| "config_watcher.h", |
| "continue_window.cc", |
| "continue_window.h", |
| "crash_process.cc", |
| "crash_process.h", |
| "curtain_mode.h", |
| "daemon_process.cc", |
| "daemon_process.h", |
| "desktop_and_cursor_composer_notifier.cc", |
| "desktop_and_cursor_composer_notifier.h", |
| "desktop_and_cursor_conditional_composer.cc", |
| "desktop_capturer_checker.cc", |
| "desktop_capturer_checker.h", |
| "desktop_capturer_proxy.cc", |
| "desktop_capturer_proxy.h", |
| "desktop_display_info.cc", |
| "desktop_display_info.h", |
| "desktop_display_info_loader.h", |
| "desktop_display_info_monitor.cc", |
| "desktop_display_info_monitor.h", |
| "desktop_process.cc", |
| "desktop_process.h", |
| "desktop_resizer.h", |
| "desktop_session.cc", |
| "desktop_session.h", |
| "desktop_session_agent.cc", |
| "desktop_session_agent.h", |
| "desktop_session_connector.h", |
| "desktop_session_proxy.cc", |
| "desktop_session_proxy.h", |
| "evaluate_capability.cc", |
| "ftl_echo_message_listener.cc", |
| "ftl_echo_message_listener.h", |
| "ftl_host_change_notification_listener.cc", |
| "ftl_host_change_notification_listener.h", |
| "ftl_signaling_connector.cc", |
| "ftl_signaling_connector.h", |
| "heartbeat_sender.cc", |
| "heartbeat_sender.h", |
| "host_attributes.cc", |
| "host_attributes.h", |
| "host_config.cc", |
| "host_config.h", |
| "host_details.cc", |
| "host_details.h", |
| "host_event_logger.h", |
| "host_event_reporter.h", |
| "host_experiment_session_plugin.cc", |
| "host_experiment_session_plugin.h", |
| "host_extension_session_manager.cc", |
| "host_extension_session_manager.h", |
| "host_power_save_blocker.cc", |
| "host_power_save_blocker.h", |
| "host_secret.cc", |
| "host_secret.h", |
| "host_status_logger.cc", |
| "host_status_logger.h", |
| "host_status_monitor.cc", |
| "host_status_monitor.h", |
| "host_status_observer.h", |
| "host_window.cc", |
| "host_window.h", |
| "host_window_proxy.cc", |
| "host_window_proxy.h", |
| "ipc_action_executor.cc", |
| "ipc_action_executor.h", |
| "ipc_audio_capturer.cc", |
| "ipc_audio_capturer.h", |
| "ipc_desktop_environment.cc", |
| "ipc_desktop_environment.h", |
| "ipc_host_event_logger.cc", |
| "ipc_host_event_logger.h", |
| "ipc_input_injector.cc", |
| "ipc_input_injector.h", |
| "ipc_keyboard_layout_monitor.cc", |
| "ipc_keyboard_layout_monitor.h", |
| "ipc_mouse_cursor_monitor.cc", |
| "ipc_mouse_cursor_monitor.h", |
| "ipc_screen_controls.cc", |
| "ipc_screen_controls.h", |
| "ipc_url_forwarder_configurator.cc", |
| "ipc_url_forwarder_configurator.h", |
| "ipc_video_frame_capturer.cc", |
| "ipc_video_frame_capturer.h", |
| "it2me_desktop_environment.cc", |
| "it2me_desktop_environment.h", |
| "keyboard_layout_monitor.cc", |
| "keyboard_layout_monitor.h", |
| "mouse_cursor_monitor_proxy.cc", |
| "mouse_cursor_monitor_proxy.h", |
| "mouse_shape_pump.cc", |
| "mouse_shape_pump.h", |
| "pairing_registry_delegate.cc", |
| "pairing_registry_delegate.h", |
| "pin_hash.cc", |
| "pin_hash.h", |
| "policy_watcher.cc", |
| "policy_watcher.h", |
| "register_support_host_request.h", |
| "remote_input_filter.cc", |
| "remote_input_filter.h", |
| "remoting_register_support_host_request.cc", |
| "remoting_register_support_host_request.h", |
| "resizing_host_observer.cc", |
| "resizing_host_observer.h", |
| "server_log_entry_host.cc", |
| "server_log_entry_host.h", |
| "shutdown_watchdog.cc", |
| "shutdown_watchdog.h", |
| "test_echo_extension.cc", |
| "test_echo_extension.h", |
| "test_echo_extension_session.cc", |
| "test_echo_extension_session.h", |
| "third_party_auth_config.cc", |
| "third_party_auth_config.h", |
| "token_validator_base.cc", |
| "token_validator_base.h", |
| "token_validator_factory_impl.cc", |
| "token_validator_factory_impl.h", |
| "usage_stats_consent.h", |
| "xmpp_register_support_host_request.cc", |
| "xmpp_register_support_host_request.h", |
| "xsession_chooser_ui.inc", |
| "zombie_host_detector.cc", |
| "zombie_host_detector.h", |
| ] |
| |
| libs = [] |
| |
| configs += [ |
| "//build/config/compiler:wexit_time_destructors", |
| "//remoting/build/config:version", |
| ] |
| |
| defines = [ "WEBRTC_CHROMIUM_BUILD" ] |
| |
| deps = [ |
| ":client_session_control", |
| ":clipboard", |
| ":host_main_headers", |
| ":ipc_constants", |
| ":resources", |
| ":settings", |
| "//base:i18n", |
| "//build:branding_buildflags", |
| "//build:chromeos_buildflags", |
| "//components/policy/core/common", |
| "//components/webrtc:thread_wrapper", |
| "//crypto", |
| "//google_apis", |
| "//media", |
| "//remoting/base", |
| "//remoting/base:authorization", |
| "//remoting/host/file_transfer:common", |
| "//remoting/host/input_monitor", |
| "//remoting/host/mojo_ipc", |
| "//remoting/host/mojom", |
| "//remoting/host/remote_open_url:common", |
| "//remoting/host/security_key", |
| "//remoting/host/webauthn", |
| "//remoting/proto/ftl/v1:ftl_messages", |
| "//remoting/proto/remoting/v1:remote_support_host_messages", |
| "//remoting/protocol", |
| "//remoting/resources", |
| "//remoting/signaling:signaling", |
| "//services/network:network_service", |
| "//services/network/public/cpp:cpp", |
| "//third_party/libjingle_xmpp:rtc_xmllite", |
| "//third_party/webrtc_overrides:webrtc_component", |
| "//ui/events:events", |
| |
| # //remoting uses the power_save_blocker directly. See crbug.com/689423 |
| "//services/device/wake_lock/power_save_blocker", |
| "//ui/base", |
| "//ui/events:dom_keycode_converter", |
| "//ui/events/platform", |
| ] |
| |
| public_deps = [ |
| ":common_headers", |
| ":host_extension", |
| "//ipc", |
| "//remoting/host/base", |
| "//remoting/proto", |
| "//remoting/proto/remoting/v1:directory_proto", |
| ] |
| |
| if (is_posix) { |
| sources += [ |
| "host_event_logger_posix.cc", |
| "posix/signal_handler.cc", |
| "posix/signal_handler.h", |
| ] |
| } |
| |
| if (!is_ios) { |
| deps += [ "//components/policy:generated" ] |
| } |
| |
| if (is_linux) { |
| sources += [ |
| "host_utmp_logger.cc", |
| "host_utmp_logger.h", |
| ] |
| |
| libs += [ |
| "utempter", |
| "util", |
| ] |
| } |
| |
| if (is_linux) { |
| sources += [ |
| "linux/audio_pipe_reader.cc", |
| "linux/audio_pipe_reader.h", |
| "linux/certificate_watcher.cc", |
| "linux/certificate_watcher.h", |
| ] |
| |
| libs += [ "pam" ] |
| |
| deps += [ "//build/config/linux/gtk" ] |
| |
| if (remoting_use_x11) { |
| deps += [ "linux:x11" ] |
| } |
| } |
| |
| if (remoting_use_x11) { |
| defines += [ "REMOTING_USE_X11" ] |
| sources += [ |
| "desktop_display_info_loader_x11.cc", |
| "desktop_resizer_x11.cc", |
| "desktop_resizer_x11.h", |
| "input_injector_x11.cc", |
| ] |
| deps += [ |
| "//remoting/host/linux:x11", |
| "//ui/base/x", |
| "//ui/events/platform/x11", |
| "//ui/gfx/x", |
| ] |
| if (is_linux) { |
| deps += [ "//build/config/linux/gtk" ] |
| } |
| } |
| |
| if (is_linux && (!remoting_use_x11 || is_chromeos)) { |
| # On Linux, exactly one of desktop_resizer_{linux,x11}.cc should be |
| # compiled in. The _linux version is a no-op and should be used on |
| # platforms without X11. |
| sources += [ "desktop_resizer_linux.cc" ] |
| } |
| |
| if (is_linux) { |
| sources += [ |
| "audio_capturer_linux.cc", |
| "audio_capturer_linux.h", |
| "continue_window_linux.cc", |
| "curtain_mode_linux.cc", |
| "disconnect_window_linux.cc", |
| "keyboard_layout_monitor_linux.cc", |
| "pairing_registry_delegate_linux.cc", |
| "pairing_registry_delegate_linux.h", |
| "xsession_chooser_linux.cc", |
| ] |
| } |
| |
| if (is_chromeos_ash) { |
| sources += [ |
| "audio_capturer_chromeos.cc", |
| "continue_window_chromeos.cc", |
| "desktop_display_info_loader_chromeos.cc", |
| "disconnect_window_chromeos.cc", |
| "input_injector_chromeos.cc", |
| "input_injector_chromeos.h", |
| "keyboard_layout_monitor_chromeos.cc", |
| ] |
| deps += [ |
| "//ash", |
| "//remoting/host/chromeos", |
| "//ui/base/ime/ash", |
| ] |
| |
| if (use_ozone) { |
| deps += [ |
| "//ui/events/ozone/layout", |
| "//ui/ozone", |
| ] |
| } |
| } else { |
| sources += [ "me2me_desktop_environment.cc" ] |
| } |
| |
| if (is_mac) { |
| sources += [ |
| "audio_capturer_mac.cc", |
| "audio_capturer_mac.h", |
| "continue_window_mac.mm", |
| "curtain_mode_mac.cc", |
| "desktop_display_info_loader_mac.mm", |
| "desktop_resizer_mac.cc", |
| "disconnect_window_mac.h", |
| "disconnect_window_mac.mm", |
| "input_injector_mac.cc", |
| "keyboard_layout_monitor_mac.cc", |
| "pairing_registry_delegate_mac.cc", |
| "usage_stats_consent_mac.cc", |
| ] |
| frameworks = [ |
| "Accelerate.framework", |
| "Carbon.framework", |
| "CoreAudio.framework", |
| ] |
| |
| deps += [ |
| ":remoting_version", |
| "//remoting/host/base", |
| "//remoting/host/mac:permission_checking", |
| "//ui/events:events", |
| ] |
| } |
| |
| if (is_win) { |
| sources += [ |
| "audio_capturer_win.cc", |
| "audio_capturer_win.h", |
| "continue_window_win.cc", |
| "curtain_mode_win.cc", |
| "daemon_process_win.cc", |
| "desktop_display_info_loader_win.cc", |
| "desktop_resizer_win.cc", |
| "desktop_session_win.cc", |
| "desktop_session_win.h", |
| "disconnect_window_win.cc", |
| "host_event_logger_win.cc", |
| "input_injector_win.cc", |
| "keyboard_layout_monitor_win.cc", |
| "pairing_registry_delegate_win.cc", |
| "pairing_registry_delegate_win.h", |
| "sas_injector_win.cc", |
| "touch_injector_win.cc", |
| "touch_injector_win.h", |
| "usage_stats_consent_win.cc", |
| ] |
| libs += [ "crypt32.lib" ] |
| deps += [ |
| # On Windows, we use //media/gpu/MediaFoundationVideoEncodeAcceleratorWin |
| # to detect whether HW encoder is supported by the system. |
| "//media", |
| "//media/base/win:media_foundation_util", |
| "//media/gpu:gpu", |
| "//mojo/core/embedder:embedder", |
| "//remoting/host/win", |
| "//remoting/host/win:messages", |
| "//remoting/host/win:remoting_lib_idl", |
| "//remoting/host/win:trust_util", |
| ] |
| |
| public_deps += [ "//remoting/host/win" ] |
| } |
| } |
| |
| static_library("test_support") { |
| testonly = true |
| |
| sources = [ |
| "fake_desktop_environment.cc", |
| "fake_desktop_environment.h", |
| "fake_host_extension.cc", |
| "fake_host_extension.h", |
| "fake_keyboard_layout_monitor.cc", |
| "fake_keyboard_layout_monitor.h", |
| "fake_mouse_cursor_monitor.cc", |
| "fake_mouse_cursor_monitor.h", |
| "host_mock_objects.cc", |
| "host_mock_objects.h", |
| ] |
| |
| configs += [ "//remoting/build/config:version" ] |
| |
| deps = [ |
| ":chromoting_host_services_client", |
| ":client_session_control", |
| "//remoting/codec:encoder", |
| "//remoting/host/base", |
| "//remoting/host/file_transfer:common", |
| "//remoting/host/mojom", |
| "//remoting/host/remote_open_url:common", |
| "//remoting/host/remote_open_url:test_support", |
| "//remoting/host/security_key:security_key", |
| "//remoting/proto", |
| "//remoting/protocol:protocol", |
| "//remoting/protocol:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//ui/events:events", |
| ] |
| public_deps = [ |
| ":common", |
| "//remoting/base:test_support", |
| "//remoting/host/file_transfer:test_support", |
| "//third_party/libjingle_xmpp:rtc_xmllite", |
| "//third_party/protobuf:protobuf_lite", |
| "//third_party/webrtc_overrides:webrtc_component", |
| ] |
| } |
| |
| # The host portions of the remoting unit tests. |
| source_set("unit_tests") { |
| testonly = true |
| |
| sources = [ |
| "audio_silence_detector_unittest.cc", |
| "audio_volume_filter_unittest.cc", |
| "backoff_timer_unittest.cc", |
| "chromoting_host_context_unittest.cc", |
| "chromoting_host_unittest.cc", |
| "client_session_unittest.cc", |
| "config_file_watcher_unittest.cc", |
| "daemon_process_unittest.cc", |
| "desktop_display_info_unittest.cc", |
| "desktop_process_unittest.cc", |
| "desktop_session_agent_unittest.cc", |
| "ftl_echo_message_listener_unittest.cc", |
| "ftl_host_change_notification_listener_unittest.cc", |
| "ftl_signaling_connector_unittest.cc", |
| "heartbeat_sender_unittest.cc", |
| "host_attributes_unittest.cc", |
| "host_config_unittest.cc", |
| "host_experiment_session_plugin_unittest.cc", |
| "host_extension_session_manager_unittest.cc", |
| "host_power_save_blocker_unittest.cc", |
| "host_status_logger_unittest.cc", |
| "input_monitor/local_input_monitor_unittest.cc", |
| "ipc_desktop_environment_unittest.cc", |
| "it2me/it2me_confirmation_dialog_proxy_unittest.cc", |
| "it2me/it2me_host_unittest.cc", |
| "it2me/it2me_native_messaging_host_unittest.cc", |
| "mouse_cursor_monitor_proxy_unittest.cc", |
| "mouse_shape_pump_unittest.cc", |
| "native_messaging/native_messaging_reader_unittest.cc", |
| "native_messaging/native_messaging_writer_unittest.cc", |
| "pin_hash_unittest.cc", |
| "policy_watcher_unittest.cc", |
| "remote_input_filter_unittest.cc", |
| "remoting_register_support_host_request_unittest.cc", |
| "resizing_host_observer_unittest.cc", |
| "resources_unittest.cc", |
| "server_log_entry_host_unittest.cc", |
| "setup/me2me_native_messaging_host_unittest.cc", |
| "setup/pin_validator_unittest.cc", |
| "third_party_auth_config_unittest.cc", |
| "token_validator_base_unittest.cc", |
| "token_validator_factory_impl_unittest.cc", |
| "xmpp_register_support_host_request_unittest.cc", |
| "zombie_host_detector_unittest.cc", |
| ] |
| |
| # MojoIpcServer currently only works on Linux and Windows. |
| if (is_linux || is_win) { |
| sources += [ "chromoting_host_services_client_unittest.cc" ] |
| } |
| |
| if (use_ozone || is_chromeos_ash) { |
| sources -= [ "input_monitor/local_input_monitor_unittest.cc" ] |
| } |
| |
| configs += [ "//remoting/build/config:version" ] |
| |
| deps = [ |
| ":chromoting_host_services_client", |
| ":client_session_control", |
| ":common", |
| ":resources", |
| ":test_support", |
| "//build:branding_buildflags", |
| "//build:chromeos_buildflags", |
| "//net:test_support", |
| "//remoting/codec:encoder", |
| "//remoting/host/base", |
| "//remoting/host/file_transfer:unit_tests", |
| "//remoting/host/input_monitor:input_monitor", |
| "//remoting/host/it2me:common", |
| "//remoting/host/it2me:constants", |
| "//remoting/host/mojo_ipc", |
| "//remoting/host/mojo_ipc:test_support", |
| "//remoting/host/mojo_ipc:unit_tests", |
| "//remoting/host/mojom", |
| "//remoting/host/native_messaging", |
| "//remoting/host/remote_open_url:test_support", |
| "//remoting/host/remote_open_url:unit_tests", |
| "//remoting/host/security_key:unit_tests", |
| "//remoting/host/setup:common", |
| "//remoting/host/webauthn:unit_tests", |
| "//remoting/proto", |
| "//remoting/proto/remoting/v1:remote_support_host_messages", |
| "//remoting/protocol:test_support", |
| "//remoting/resources", |
| "//remoting/signaling", |
| "//remoting/signaling:test_support", |
| "//remoting/signaling:unit_tests", |
| "//skia", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//ui/base:base", |
| "//ui/events:events", |
| ] |
| |
| if (is_linux) { |
| sources += [ "pairing_registry_delegate_linux_unittest.cc" ] |
| } |
| |
| if (is_linux) { |
| deps += [ "//remoting/host/linux:unit_tests" ] |
| } |
| |
| if (is_chromeos_ash) { |
| sources += [ "desktop_display_info_loader_chromeos_unittest.cc" ] |
| deps += [ |
| "//remoting/host/chromeos", |
| "//remoting/host/chromeos:reporter_unit_tests", |
| "//remoting/host/chromeos:unit_tests", |
| ] |
| } |
| |
| if (is_win) { |
| sources += [ |
| "pairing_registry_delegate_win_unittest.cc", |
| "touch_injector_win_unittest.cc", |
| ] |
| deps += [ "//remoting/host/win:unit_tests" ] |
| } |
| |
| if (!is_ios) { |
| deps += [ "//components/policy/core/browser:test_support" ] |
| } |
| |
| if (enable_me2me_host) { |
| sources += [ "evaluate_capability_unittest.cc" ] |
| data_deps = [ "//remoting/test:capability_test_stub" ] |
| } |
| } |
| |
| group("remoting_host_branded") { |
| testonly = true |
| deps = [] |
| if (enable_remoting_host) { |
| deps += [ ":remoting_host_installation" ] |
| } |
| if (enable_me2me_host) { |
| deps += [ "//remoting/host:remoting_me2me_host_archive" ] |
| } |
| } |
| |
| if (enable_remoting_host) { |
| group("remoting_host_installation") { |
| deps = [] |
| if (is_win) { |
| deps += [ "//remoting/host/installer/win:remoting_host_installation" ] |
| } |
| } |
| } |
| |
| if (enable_remoting_host) { |
| executable("remoting_start_host") { |
| sources = [ "setup/start_host_entry_point.cc" ] |
| |
| deps = [ "//remoting/host/setup:start_host_main_headers" ] |
| |
| if (is_win || is_linux) { |
| deps += [ ":remoting_core" ] |
| } else { |
| deps += [ "//remoting/host/setup:start_host_main" ] |
| } |
| |
| configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| |
| if (is_win) { |
| defines = host_predefines + |
| [ "REMOTING_HOST_BINARY=BINARY_REMOTING_START_HOST" ] |
| |
| deps += [ |
| "//remoting/host/win:elevated_exe_manifest", |
| "//remoting/host/win:remoting_windows_resources", |
| ] |
| } |
| } |
| |
| action_foreach("remoting_native_messaging_manifests") { |
| if (is_mac) { |
| me2me_host_path = "/Library/PrivilegedHelperTools/$me2me_host_bundle_name/Contents/MacOS/$native_messaging_host_bundle_name/Contents/MacOS/native_messaging_host" |
| it2me_host_path = "/Library/PrivilegedHelperTools/$me2me_host_bundle_name/Contents/MacOS/$remote_assistance_host_bundle_name/Contents/MacOS/remote_assistance_host" |
| remote_webauthn_path = "/Library/PrivilegedHelperTools/$me2me_host_bundle_name/Contents/MacOS/$remote_assistance_host_bundle_name/Contents/MacOS/remote_webauthn" |
| } else if (is_win) { |
| me2me_host_path = "remoting_native_messaging_host.exe" |
| it2me_host_path = "remote_assistance_host.exe" |
| remote_webauthn_path = "remote_webauthn.exe" |
| } else { |
| me2me_host_path = |
| "/opt/google/chrome-remote-desktop/native-messaging-host" |
| it2me_host_path = |
| "/opt/google/chrome-remote-desktop/remote-assistance-host" |
| remote_webauthn_path = "/opt/google/chrome-remote-desktop/remote-webauthn" |
| } |
| |
| script = "../tools/build/remoting_localize.py" |
| |
| sources = [ |
| "it2me/com.google.chrome.remote_assistance-firefox.json.jinja2", |
| "it2me/com.google.chrome.remote_assistance.json.jinja2", |
| "setup/com.google.chrome.remote_desktop-firefox.json.jinja2", |
| "setup/com.google.chrome.remote_desktop.json.jinja2", |
| "setup/com.google.chrome.remote_webauthn.json.jinja2", |
| ] |
| |
| inputs = [ branding_path ] |
| |
| outputs = [ "$root_build_dir/remoting/{{source_name_part}}" ] |
| |
| args = [ |
| "--define", |
| "ME2ME_HOST_PATH=$me2me_host_path", |
| "--define", |
| "IT2ME_HOST_PATH=$it2me_host_path", |
| "--define", |
| "REMOTE_WEBAUTHN_PATH=$remote_webauthn_path", |
| "--variables", |
| rebase_path(branding_path, root_build_dir), |
| "--template", |
| "{{source}}", |
| "--output", |
| "remoting/{{source_name_part}}", |
| "en", |
| ] |
| } |
| |
| if (is_mac) { |
| action_foreach("remoting_infoplist_strings") { |
| sources = [ |
| "installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2", |
| "it2me/remote_assistance_host-InfoPlist.strings.jinja2", |
| "remoting_me2me_host-InfoPlist.strings.jinja2", |
| "setup/native_messaging_host-InfoPlist.strings.jinja2", |
| ] |
| |
| script = "//remoting/tools/build/remoting_localize.py" |
| args = [ |
| "--locale_dir", |
| rebase_path(resources_locale_dir, root_build_dir), |
| "--variables", |
| rebase_path(branding_path, root_build_dir), |
| "--template", |
| "{{source}}", |
| "--locale_output", |
| rebase_path( |
| "$root_gen_dir/remoting/host/{{source_name_part}}/@{json_suffix}.lproj/InfoPlist.strings", |
| root_build_dir), |
| ] + remoting_locales_with_underscores |
| |
| outputs = [] |
| foreach(locale, remoting_locales_with_underscores) { |
| outputs += [ "$root_gen_dir/remoting/host/{{source_name_part}}/$locale.lproj/InfoPlist.strings" ] |
| } |
| |
| deps = [ |
| "//remoting/resources", |
| "//remoting/resources:strings", |
| ] |
| } |
| } |
| } |
| |
| if (enable_me2me_host) { |
| static_library("remoting_me2me_host_static") { |
| sources = [ "remoting_me2me_host.cc" ] |
| defines = [] |
| |
| configs += [ |
| "//remoting/build/config:version", |
| "//remoting/build/config:remoting_me2me_host", |
| ] |
| |
| deps = [ |
| ":settings", |
| "//base", |
| "//base:i18n", |
| "//components/policy/core/common", |
| "//components/webrtc:thread_wrapper", |
| "//ipc", |
| "//mojo/core/embedder", |
| "//net", |
| "//remoting/base", |
| "//remoting/base:authorization", |
| "//remoting/host", |
| "//remoting/host/base", |
| "//remoting/host/mojom", |
| "//remoting/host/security_key:security_key", |
| "//remoting/proto", |
| "//remoting/protocol:protocol", |
| "//remoting/signaling:signaling", |
| "//services/network/public/cpp:cpp", |
| "//third_party/libjingle_xmpp:rtc_xmllite", |
| "//third_party/webrtc_overrides:webrtc_component", |
| ] |
| |
| if (remoting_use_x11) { |
| deps += [ "//ui/events/platform/x11:x11" ] |
| } |
| |
| if (is_posix) { |
| sources += [ |
| "pam_authorization_factory_posix.cc", |
| "pam_authorization_factory_posix.h", |
| ] |
| } |
| |
| if (!is_ios) { |
| deps += [ "//components/policy:generated" ] |
| } |
| |
| if (is_linux || is_chromeos_lacros) { |
| deps += [ "//build/config/linux/gtk" ] |
| } |
| if (is_linux || is_chromeos_lacros || is_mac) { |
| libs = [ "pam" ] |
| } |
| |
| if (is_mac) { |
| deps += [ "//remoting/host/mac:permission_checking" ] |
| } |
| } |
| |
| source_set("main") { |
| configs += [ |
| "//remoting/build/config:host_implementation", |
| "//remoting/build/config:version", |
| ] |
| sources = [ "host_main.cc" ] |
| deps = [ |
| ":common", |
| ":host_main_headers", |
| ":remoting_me2me_host_static", |
| ":resources", |
| "//base", |
| "//base:debugging_buildflags", |
| "//mojo/core/embedder:embedder", |
| "//remoting/base:breakpad", |
| "//remoting/host/base", |
| "//remoting/host/setup:common", |
| ] |
| } |
| |
| # Windows defines its own entry point function. |
| # TODO(yuweih): Enable shared library on Mac. |
| if (!is_win) { |
| source_set("entry_point") { |
| sources = [ "entry_point.cc" ] |
| deps = [ ":host_main_headers" ] |
| if (is_mac) { |
| deps += [ ":main" ] |
| } else { |
| deps += [ ":remoting_core" ] |
| } |
| } |
| } |
| |
| if (is_win || is_linux) { |
| group("implementation") { |
| deps = [ |
| ":main", |
| "//remoting/host/it2me:main", |
| "//remoting/host/remote_open_url:main", |
| "//remoting/host/security_key:main", |
| "//remoting/host/setup:native_messaging_host_main", |
| "//remoting/host/setup:start_host_main", |
| "//remoting/host/webauthn:main", |
| ] |
| } |
| if (is_win) { |
| group("remoting_core") { |
| deps = [ "//remoting/host/win:remoting_core" ] |
| } |
| } else { |
| shared_library("remoting_core") { |
| deps = [ ":implementation" ] |
| |
| if (!is_component_build) { |
| # Set rpath on dependent executables so that they can find the shared |
| # lib in the same directory, in a non-component build. |
| all_dependent_configs = |
| [ "//build/config/gcc:rpath_for_built_shared_libraries" ] |
| } |
| } |
| } |
| } |
| |
| if (is_win) { |
| group("remoting_me2me_host") { |
| deps = [ "//remoting/host/win:remoting_me2me_host" ] |
| } |
| group("remoting_native_messaging_host") { |
| deps = [ "//remoting/host/win:remoting_native_messaging_host" ] |
| } |
| } else { |
| if (is_mac) { |
| group("remoting_me2me_host") { |
| deps = [ "//remoting/host/mac:remoting_me2me_host" ] |
| } |
| } else { |
| executable("remoting_me2me_host") { |
| deps = [ ":entry_point" ] |
| |
| # https://crbug.com/1198747 |
| assert_no_deps = [ "//ui/gtk" ] |
| } |
| } |
| |
| if (is_mac) { |
| group("remoting_native_messaging_host") { |
| deps = [ "//remoting/host/mac:remoting_native_messaging_host" ] |
| } |
| } else { |
| group("remoting_native_messaging_host") { |
| public_deps = [ "//remoting/host/linux:remoting_native_messaging_host" ] |
| } |
| } |
| } |
| if (is_chrome_branded && enable_me2me_host && |
| (is_linux || is_chromeos_lacros)) { |
| group("remoting_me2me_host_archive") { |
| deps = [ "//remoting/host/installer/linux:remoting_me2me_host_archive" ] |
| } |
| } else if (is_win) { |
| group("remoting_me2me_host_archive") { |
| deps = [ "//remoting/host/installer/win:remoting_me2me_host_archive" ] |
| } |
| } else if (is_mac) { |
| group("remoting_me2me_host_archive") { |
| deps = [ "//remoting/host/installer/mac:remoting_me2me_host_archive" ] |
| } |
| } else { |
| group("remoting_me2me_host_archive") { |
| } |
| } |
| } |