From e6430e577f105ad8813c92e75c54660c4985026e Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 18 Sep 2017 14:34:04 +0200 Subject: BASELINE: Update Chromium to 61.0.3163.99 Change-Id: I8452f34574d88ca2b27af9bd56fc9ff3f16b1367 Reviewed-by: Alexandru Croitor --- chromium/remoting/android/BUILD.gn | 8 ++ chromium/remoting/android/client_java_tmpl.gni | 4 +- chromium/remoting/client/BUILD.gn | 37 +----- chromium/remoting/client/display/BUILD.gn | 4 +- chromium/remoting/client/input/BUILD.gn | 62 +++++++++- chromium/remoting/client/jni/BUILD.gn | 1 + chromium/remoting/client/plugin/BUILD.gn | 1 + chromium/remoting/client/ui/BUILD.gn | 4 +- chromium/remoting/codec/BUILD.gn | 2 + chromium/remoting/host/BUILD.gn | 19 +++- chromium/remoting/host/linux/BUILD.gn | 3 +- chromium/remoting/host/win/BUILD.gn | 10 +- chromium/remoting/ios/BUILD.gn | 14 +-- chromium/remoting/ios/app/BUILD.gn | 125 +++++++++++++-------- chromium/remoting/ios/app/remoting_ios_tmpl.gni | 119 ++++++++++++++++++++ chromium/remoting/ios/app/resources/BUILD.gn | 83 ++++++++------ chromium/remoting/ios/app/settings/BUILD.gn | 33 ++++++ chromium/remoting/ios/display/BUILD.gn | 4 +- chromium/remoting/ios/domain/BUILD.gn | 2 + chromium/remoting/ios/facade/BUILD.gn | 4 +- chromium/remoting/ios/mdc/BUILD.gn | 20 ++++ chromium/remoting/ios/persistence/BUILD.gn | 21 ++++ chromium/remoting/proto/BUILD.gn | 1 + chromium/remoting/protocol/BUILD.gn | 10 ++ chromium/remoting/test/BUILD.gn | 1 + .../remoting/tools/build/remoting_localize.gni | 2 +- 26 files changed, 444 insertions(+), 150 deletions(-) create mode 100644 chromium/remoting/ios/app/remoting_ios_tmpl.gni create mode 100644 chromium/remoting/ios/app/settings/BUILD.gn create mode 100644 chromium/remoting/ios/mdc/BUILD.gn create mode 100644 chromium/remoting/ios/persistence/BUILD.gn (limited to 'chromium/remoting') diff --git a/chromium/remoting/android/BUILD.gn b/chromium/remoting/android/BUILD.gn index 248c1ea04b7..fdb35cbd6eb 100644 --- a/chromium/remoting/android/BUILD.gn +++ b/chromium/remoting/android/BUILD.gn @@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//base/android/jni_generator/jni_exception_list.gni") import("//build/config/android/config.gni") import("//build/config/android/rules.gni") import("//remoting/android/client_java_tmpl.gni") @@ -20,6 +21,12 @@ generate_jni("jni_headers") { jni_package = "remoting" } +generate_jni_registration("remoting_jni_registration") { + target = ":remoting_apk" + output = "$root_gen_dir/remoting/client/${target_name}.h" + exception_files = jni_exception_files +} + _raw_resources_base_dir = "$target_gen_dir/credits_resources_raw/res" # The target is named this way, instead of "..._raw_resources", specifically @@ -94,5 +101,6 @@ instrumentation_test_apk("remoting_test_apk") { "//base:base_java", "//base:base_java_test_support", "//third_party/android_support_test_runner:runner_java", + "//third_party/junit:junit", ] } diff --git a/chromium/remoting/android/client_java_tmpl.gni b/chromium/remoting/android/client_java_tmpl.gni index 705ce459f43..27e43265864 100644 --- a/chromium/remoting/android/client_java_tmpl.gni +++ b/chromium/remoting/android/client_java_tmpl.gni @@ -9,7 +9,6 @@ template("remoting_android_client_java_tmpl") { android_library(target_name) { _java_file_prefix = "//remoting/android/java/src/org/chromium/chromoting" _java_files = [ - "AccountsAdapter.java", "ActivityLifecycleListener.java", "AnimationJob.java", "Capabilities.java", @@ -55,6 +54,7 @@ template("remoting_android_client_java_tmpl") { "TrackpadInputStrategy.java", "TapEventParameter.java", "TwoPointsEventParameter.java", + "accountswitcher/AccountManagerCompat.java", "accountswitcher/AccountSwitcher.java", "accountswitcher/AccountSwitcherBase.java", "accountswitcher/AccountSwitcherBasic.java", @@ -84,7 +84,7 @@ template("remoting_android_client_java_tmpl") { "//third_party/android_tools:android_support_core_ui_java", "//third_party/android_tools:android_support_v7_appcompat_java", "//third_party/android_tools:android_support_v7_mediarouter_java", - "//ui/android:ui_java", + "//ui/android:ui_utils_java", ] deps += [ invoker.remoting_google_play_services_library ] diff --git a/chromium/remoting/client/BUILD.gn b/chromium/remoting/client/BUILD.gn index 6a966b040ae..2a283c064a0 100644 --- a/chromium/remoting/client/BUILD.gn +++ b/chromium/remoting/client/BUILD.gn @@ -3,13 +3,11 @@ # found in the LICENSE file. static_library("client") { - # Disabled the source filters because there are _mac files that need to - # be compiled on all platforms. - set_sources_assignment_filter([]) - sources = [ "audio_player.cc", "audio_player.h", + "audio_player_android.cc", + "audio_player_android.h", "chromoting_client.cc", "chromoting_client.h", "chromoting_session.cc", @@ -29,22 +27,11 @@ static_library("client") { "empty_cursor_filter.h", "host_experiment_sender.cc", "host_experiment_sender.h", - "key_event_mapper.cc", - "key_event_mapper.h", - "normalizing_input_filter_cros.cc", - "normalizing_input_filter_cros.h", - "normalizing_input_filter_mac.cc", - "normalizing_input_filter_mac.h", - "normalizing_input_filter_win.cc", - "normalizing_input_filter_win.h", "queued_task_poster.cc", "queued_task_poster.h", - "server_log_entry_client.cc", - "server_log_entry_client.h", "software_video_renderer.cc", "software_video_renderer.h", ] - set_sources_assignment_filter(sources_assignment_filter) configs += [ "//build/config/compiler:wexit_time_destructors", @@ -54,7 +41,6 @@ static_library("client") { deps = [ "//remoting/base", - "//remoting/client/input", "//remoting/codec:decoder", "//remoting/protocol", "//third_party/libyuv", @@ -65,10 +51,7 @@ static_library("client") { libs = [] if (is_nacl) { - sources -= [ - "client_telemetry_logger.cc", - "server_log_entry_client.cc", - ] + sources -= [ "client_telemetry_logger.cc" ] } else { sources += [ "chromoting_client_runtime.cc", @@ -78,14 +61,11 @@ static_library("client") { ] deps += [ "//remoting/client/display", + "//remoting/client/input", "//remoting/client/ui", ] } if (is_android) { - sources += [ - "audio_player_android.cc", - "audio_player_android.h", - ] libs += [ "android", "OpenSLES", @@ -98,22 +78,15 @@ source_set("unit_tests") { # Disabled the source filters because there are _mac files that need to # be compiled on all platforms. - set_sources_assignment_filter([]) sources = [ "audio_player_unittest.cc", "chromoting_client_runtime_unittest.cc", "client_telemetry_logger_unittest.cc", "dual_buffer_frame_consumer_unittest.cc", "empty_cursor_filter_unittest.cc", - "key_event_mapper_unittest.cc", - "normalizing_input_filter_cros_unittest.cc", - "normalizing_input_filter_mac_unittest.cc", - "normalizing_input_filter_win_unittest.cc", "queued_task_poster_unittest.cc", - "server_log_entry_client_unittest.cc", "software_video_renderer_unittest.cc", ] - set_sources_assignment_filter(sources_assignment_filter) configs += [ "//remoting/build/config:version", @@ -125,6 +98,6 @@ source_set("unit_tests") { "//remoting/proto", "//testing/gmock", "//testing/gtest", - "//third_party/webrtc/base:rtc_base_approved", + "//third_party/webrtc/rtc_base:rtc_base_approved", ] } diff --git a/chromium/remoting/client/display/BUILD.gn b/chromium/remoting/client/display/BUILD.gn index fd8fbf0bf47..ca57762bee2 100644 --- a/chromium/remoting/client/display/BUILD.gn +++ b/chromium/remoting/client/display/BUILD.gn @@ -35,7 +35,7 @@ source_set("display") { deps = [ "//third_party/libyuv", "//third_party/protobuf:protobuf_lite", - "//third_party/webrtc/base:rtc_base_approved", + "//third_party/webrtc/rtc_base:rtc_base_approved", ] public_configs = [ "//third_party/khronos:khronos_headers" ] @@ -90,7 +90,7 @@ if (is_win) { "//remoting/proto", "//testing/gmock", "//testing/gtest", - "//third_party/webrtc/base:rtc_base_approved", + "//third_party/webrtc/rtc_base:rtc_base_approved", ] } } diff --git a/chromium/remoting/client/input/BUILD.gn b/chromium/remoting/client/input/BUILD.gn index 8e7cda55b21..60d527a70eb 100644 --- a/chromium/remoting/client/input/BUILD.gn +++ b/chromium/remoting/client/input/BUILD.gn @@ -5,9 +5,10 @@ source_set("input") { sources = [ "client_input_injector.h", - "direct_input_strategy.cc", - "direct_input_strategy.h", - "input_strategy.h", + "direct_touch_input_strategy.cc", + "direct_touch_input_strategy.h", + "key_event_mapper.cc", + "key_event_mapper.h", "keyboard_input_strategy.h", "keyboard_interpreter.cc", "keyboard_interpreter.h", @@ -19,14 +20,16 @@ source_set("input") { "text_keyboard_input_strategy.h", "touch_input_scaler.cc", "touch_input_scaler.h", + "touch_input_strategy.h", "trackpad_input_strategy.cc", "trackpad_input_strategy.h", ] deps = [ + ":normalizing_input_filter", "//remoting/base", "//remoting/client/ui:ui_manipulation", - "//third_party/webrtc/base:rtc_base_approved", + "//third_party/webrtc/rtc_base:rtc_base_approved", "//ui/events:dom_keycode_converter", ] @@ -35,10 +38,33 @@ source_set("input") { } } +source_set("normalizing_input_filter") { + # Disabled the source filters because there are _mac files that need to + # be compiled on all platforms. + set_sources_assignment_filter([]) + sources = [ + "normalizing_input_filter_cros.cc", + "normalizing_input_filter_cros.h", + "normalizing_input_filter_mac.cc", + "normalizing_input_filter_mac.h", + "normalizing_input_filter_win.cc", + "normalizing_input_filter_win.h", + ] + set_sources_assignment_filter(sources_assignment_filter) + + deps = [ + "//remoting/base", + "//third_party/webrtc/rtc_base:rtc_base_approved", + "//third_party/webrtc/modules/desktop_capture:primitives", + "//ui/events:dom_keycode_converter", + ] +} + source_set("unit_tests") { testonly = true sources = [ + "key_event_mapper_unittest.cc", "touch_input_scaler_unittest.cc", ] @@ -47,11 +73,37 @@ source_set("unit_tests") { "//remoting/build/config:enable_webrtc_remoting_client", ] + deps = [ + ":input", + ":normalizing_input_filter_unit_tests", + "//remoting/proto", + "//testing/gmock", + "//testing/gtest", + "//third_party/webrtc/rtc_base:rtc_base_approved", + ] +} + +source_set("normalizing_input_filter_unit_tests") { + testonly = true + + set_sources_assignment_filter([]) + sources = [ + "normalizing_input_filter_cros_unittest.cc", + "normalizing_input_filter_mac_unittest.cc", + "normalizing_input_filter_win_unittest.cc", + ] + set_sources_assignment_filter(sources_assignment_filter) + + configs += [ + "//remoting/build/config:version", + "//remoting/build/config:enable_webrtc_remoting_client", + ] + deps = [ ":input", "//remoting/proto", "//testing/gmock", "//testing/gtest", - "//third_party/webrtc/base:rtc_base_approved", + "//third_party/webrtc/rtc_base:rtc_base_approved", ] } diff --git a/chromium/remoting/client/jni/BUILD.gn b/chromium/remoting/client/jni/BUILD.gn index f0f80828ac7..6f1092608a8 100644 --- a/chromium/remoting/client/jni/BUILD.gn +++ b/chromium/remoting/client/jni/BUILD.gn @@ -19,6 +19,7 @@ group("jni") { shared_library("remoting_client_jni") { deps = [ "//remoting/android:jni_headers", + "//remoting/android:remoting_jni_registration", "//remoting/base", "//remoting/client", "//remoting/client/display", diff --git a/chromium/remoting/client/plugin/BUILD.gn b/chromium/remoting/client/plugin/BUILD.gn index b2eb6c7b3eb..a5fc3dff4df 100644 --- a/chromium/remoting/client/plugin/BUILD.gn +++ b/chromium/remoting/client/plugin/BUILD.gn @@ -49,6 +49,7 @@ executable("remoting_client_plugin_newlib") { "//ppapi/native_client:ppapi_lib", "//remoting/base", "//remoting/client", + "//remoting/client/input", "//remoting/protocol", "//remoting/signaling", "//third_party/libyuv", diff --git a/chromium/remoting/client/ui/BUILD.gn b/chromium/remoting/client/ui/BUILD.gn index 25b31066319..8bd049494e5 100644 --- a/chromium/remoting/client/ui/BUILD.gn +++ b/chromium/remoting/client/ui/BUILD.gn @@ -17,7 +17,7 @@ source_set("ui") { public_deps = [ "//remoting/proto", - "//third_party/webrtc/base:rtc_base_approved", + "//third_party/webrtc/rtc_base:rtc_base_approved", ] } @@ -33,7 +33,7 @@ source_set("ui_manipulation") { public_deps = [ "//remoting/proto", - "//third_party/webrtc/base:rtc_base_approved", + "//third_party/webrtc/rtc_base:rtc_base_approved", ] } diff --git a/chromium/remoting/codec/BUILD.gn b/chromium/remoting/codec/BUILD.gn index 85896de9f5e..1eee9580525 100644 --- a/chromium/remoting/codec/BUILD.gn +++ b/chromium/remoting/codec/BUILD.gn @@ -15,6 +15,8 @@ source_set("encoder") { "video_encoder_verbatim.h", "video_encoder_vpx.cc", "video_encoder_vpx.h", + "webrtc_video_encoder_proxy.cc", + "webrtc_video_encoder_proxy.h", "webrtc_video_encoder_vpx.cc", "webrtc_video_encoder_vpx.h", ] diff --git a/chromium/remoting/host/BUILD.gn b/chromium/remoting/host/BUILD.gn index a699cc7e78a..887d1ad4b42 100644 --- a/chromium/remoting/host/BUILD.gn +++ b/chromium/remoting/host/BUILD.gn @@ -172,8 +172,10 @@ static_library("host") { "host_session_options.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", @@ -232,8 +234,6 @@ static_library("host") { "process_stats_agent.h", "process_stats_sender.cc", "process_stats_sender.h", - "process_stats_util.cc", - "process_stats_util.h", "register_support_host_request.cc", "register_support_host_request.h", "remote_input_filter.cc", @@ -263,6 +263,10 @@ static_library("host") { "single_window_input_injector_win.cc", "switches.cc", "switches.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", @@ -291,13 +295,16 @@ static_library("host") { "//base:i18n", "//components/policy/core/common", "//crypto", - "//device/power_save_blocker", "//google_apis", + "//media", "//remoting/base", "//remoting/base:authorization", "//remoting/host/security_key", "//remoting/protocol", "//remoting/resources", + + # //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", @@ -405,7 +412,6 @@ static_library("test_support") { "fake_desktop_environment.h", "fake_host_extension.cc", "fake_host_extension.h", - "fake_host_status_monitor.h", "fake_mouse_cursor_monitor.cc", "fake_mouse_cursor_monitor.h", "host_mock_objects.cc", @@ -448,6 +454,7 @@ source_set("unit_tests") { "config_file_watcher_unittest.cc", "daemon_process_unittest.cc", "desktop_process_unittest.cc", + "desktop_session_agent_unittest.cc", "gcd_rest_client_unittest.cc", "gcd_state_updater_unittest.cc", "heartbeat_sender_unittest.cc", @@ -626,7 +633,7 @@ if (enable_remoting_host) { "--define", "IT2ME_HOST_PATH=$it2me_host_path", "--variables", - rebase_path(branding_path), + rebase_path(branding_path, root_build_dir), "--template", "{{source}}", "--output", @@ -649,7 +656,7 @@ if (enable_remoting_host) { "--locale_dir", rebase_path(webapp_locale_dir, root_build_dir), "--variables", - rebase_path(branding_path), + rebase_path(branding_path, root_build_dir), "--template", "{{source}}", "--locale_output", diff --git a/chromium/remoting/host/linux/BUILD.gn b/chromium/remoting/host/linux/BUILD.gn index 62e93e2da48..4cb1b29bcc4 100644 --- a/chromium/remoting/host/linux/BUILD.gn +++ b/chromium/remoting/host/linux/BUILD.gn @@ -90,7 +90,7 @@ source_set("x11") { ] } -target("executable", "remoting_native_messaging_host") { +executable("remoting_native_messaging_host") { configs += [ "//build/config/compiler:wexit_time_destructors" ] sources = [ @@ -101,6 +101,7 @@ target("executable", "remoting_native_messaging_host") { deps = [ "//base", + "//build/config:exe_and_shlib_deps", "//net", "//remoting/base:breakpad", "//remoting/host", diff --git a/chromium/remoting/host/win/BUILD.gn b/chromium/remoting/host/win/BUILD.gn index c1ae49c5c2d..ffb557c4dca 100644 --- a/chromium/remoting/host/win/BUILD.gn +++ b/chromium/remoting/host/win/BUILD.gn @@ -85,8 +85,6 @@ source_set("win") { "com_security.h", "default_audio_device_change_detector.cc", "default_audio_device_change_detector.h", - "elevation_helpers.cc", - "elevation_helpers.h", "launch_process_with_token.cc", "launch_process_with_token.h", "omaha.cc", @@ -115,13 +113,18 @@ source_set("win") { "//remoting/build/config:version", ] + if (is_clang) { + # TODO(thakis): Remove this once midl.exe no longer produces nonstandard + # C++ (see the enums in com_imported_mstscax.tlh). + cflags = [ "-Wno-microsoft-enum-forward-reference" ] + } + defines = [ "WEBRTC_CHROMIUM_BUILD" ] deps = [ "//base:i18n", "//components/policy/core/common", "//crypto", - "//device/power_save_blocker", "//ipc", "//remoting/base", "//remoting/host/security_key", @@ -129,6 +132,7 @@ source_set("win") { "//remoting/host/win:remoting_lib_idl", "//remoting/protocol", "//remoting/resources", + "//services/device/wake_lock/power_save_blocker", "//ui/base", "//ui/events:dom_keycode_converter", "//ui/events/platform", diff --git a/chromium/remoting/ios/BUILD.gn b/chromium/remoting/ios/BUILD.gn index 50204d46e96..d3108aedbea 100644 --- a/chromium/remoting/ios/BUILD.gn +++ b/chromium/remoting/ios/BUILD.gn @@ -27,28 +27,16 @@ source_set("ios_core") { "client_gestures.mm", "client_keyboard.h", "client_keyboard.mm", - "host_preferences.h", - "host_preferences.mm", - "host_preferences_persistence.h", "keychain_wrapper.h", "keychain_wrapper.mm", ] - if (!is_chrome_branded) { - sources += [ "host_preferences_persistence_chromium.mm" ] - } else { - # TODO(nicholss): Until we have a private implementation of this, stub it - # with the chromium version. We still want the logic of is_chrome_branded - # but to get the release builds building we will just reuse the file. - sources += [ "host_preferences_persistence_chromium.mm" ] - } - public_deps = [ "//remoting/ios/domain", "//remoting/ios/facade", "//remoting/ios/session", - "//third_party/webrtc/base:rtc_base", "//third_party/webrtc/modules/desktop_capture:primitives", + "//third_party/webrtc/rtc_base:rtc_base", ] deps = [ diff --git a/chromium/remoting/ios/app/BUILD.gn b/chromium/remoting/ios/app/BUILD.gn index 81be7b3b4c5..56e87cb04bd 100644 --- a/chromium/remoting/ios/app/BUILD.gn +++ b/chromium/remoting/ios/app/BUILD.gn @@ -2,11 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//build/config/chrome_build.gni") -import("//build/config/ios/rules.gni") -import("//build/mac/tweak_info_plist.gni") -import("//build/util/process_version.gni") import("//remoting/build/config/remoting_build.gni") +import("//remoting/ios/app/remoting_ios_tmpl.gni") group("all") { testonly = true @@ -16,25 +13,70 @@ group("all") { ] } -source_set("main") { +foreach(locale, remoting_locales_with_underscores) { + bundle_data("locale_${locale}_bundle_data") { + sources = [ + "$root_out_dir/remoting/resources/$locale.lproj/locale.pak", + ] + outputs = [ + "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}", + ] + public_deps = [ + "//remoting/resources:copy_locales", + ] + } +} + +# source set to be used by both external and internal app. +source_set("common_source_set") { sources = [ "app_delegate.h", "app_delegate.mm", + "app_initializer.h", + "app_view_controller.h", "client_connection_view_controller.h", "client_connection_view_controller.mm", + "first_launch_view_controller.h", + "first_launch_view_controller.mm", + "first_launch_view_presenter.h", + "first_launch_view_presenter.mm", + "help_and_feedback.h", + "help_and_feedback.mm", + "help_view_controller.h", + "help_view_controller.mm", + "host_collection_header_view.h", + "host_collection_header_view.mm", "host_collection_view_cell.h", "host_collection_view_cell.mm", "host_collection_view_controller.h", "host_collection_view_controller.mm", + "host_fetching_view_controller.h", + "host_fetching_view_controller.mm", + "host_setup_footer_view.h", + "host_setup_footer_view.mm", + "host_setup_header_view.h", + "host_setup_header_view.mm", + "host_setup_view_cell.h", + "host_setup_view_cell.mm", + "host_setup_view_controller.h", + "host_setup_view_controller.mm", "host_view_controller.h", "host_view_controller.mm", "main.mm", "pin_entry_view.h", "pin_entry_view.mm", - "remoting_settings_view_controller.h", - "remoting_settings_view_controller.mm", + "remoting_theme.h", + "remoting_theme.mm", "remoting_view_controller.h", "remoting_view_controller.mm", + "session_reconnect_view.h", + "session_reconnect_view.mm", + "side_menu_items.h", + "side_menu_items.mm", + "user_status_presenter.h", + "user_status_presenter.mm", + "web_view_controller.h", + "web_view_controller.mm", ] deps = [ @@ -44,12 +86,23 @@ source_set("main") { "//remoting/client", "//remoting/client/input", "//remoting/ios:ios_core", + "//remoting/ios/app/resources:assets", + "//remoting/ios/app/settings", + "//remoting/ios/display", + "//remoting/ios/domain", + "//remoting/ios/mdc", + "//remoting/ios/persistence", "//remoting/protocol", + "//remoting/resources", "//ui/base", "//ui/gfx", "//ui/resources", ] + foreach(locale, remoting_locales_with_underscores) { + deps += [ ":locale_${locale}_bundle_data" ] + } + public_deps = [ "//ios/third_party/material_components_ios", ] @@ -57,53 +110,27 @@ source_set("main") { configs += [ "//build/config/compiler:enable_arc" ] } -tweak_info_plist("tweak_info_plist") { - info_plist = "//remoting/ios/app/resources/Info.plist" - args = [ "--platform=ios" ] -} - -ios_app_bundle("ios_remoting_app") { - output_name = "$remoting_ios_executable_name" - - entitlements_path = "resources/Remoting.entitlements" - info_plist_target = ":tweak_info_plist" - - extra_substitutions = [ - "BUNDLE_IDENTIFIER=$remoting_ios_bundle_id", - "DISPLAY_NAME=$remoting_ios_display_name", - "EXECUTABLE_NAME=$remoting_ios_executable_name", - "MINIMUM_OS_VERSION=7.0", - "PRODUCT_NAME=$remoting_ios_product_name", - "VERSION_FULL=$remoting_version_full", - "VERSION_SHORT=$remoting_version_short", +source_set("app_source_set") { + sources = [ + "app_initializer_chromium.mm", + "app_view_controller_chromium.mm", + "remoting_menu_view_controller.h", + "remoting_menu_view_controller.mm", ] - - libs = [ - "Accelerate.framework", - "AudioToolbox.framework", - "CoreAudio.framework", - "CoreData.framework", - "CoreMIDI.framework", - "CoreVideo.framework", - "GLKit.framework", - "OpenGLES.framework", - "Webkit.framework", - "SafariServices.framework", - "SystemConfiguration.framework", + deps = [ + ":common_source_set", + "//base", ] + configs += [ "//build/config/compiler:enable_arc" ] +} +ios_remoting_app_tmpl("ios_remoting_app") { + output_name = "chromoting" + info_plist_path = "resources/Info.plist" + entitlements_path = "resources/Remoting.entitlements" deps = [ - ":main", - "//base", - "//remoting/ios/app/resources:assets", + ":app_source_set", "//remoting/ios/app/resources:launchscreen_assets", "//remoting/ios/app/resources:remoting_icons", - "//remoting/ios/display", ] - - bundle_deps = [ ":launchscreen_storyboard" ] -} - -bundle_data_ib_file("launchscreen_storyboard") { - source = "resources/LaunchScreen.storyboard" } diff --git a/chromium/remoting/ios/app/remoting_ios_tmpl.gni b/chromium/remoting/ios/app/remoting_ios_tmpl.gni new file mode 100644 index 00000000000..1de62071707 --- /dev/null +++ b/chromium/remoting/ios/app/remoting_ios_tmpl.gni @@ -0,0 +1,119 @@ +# Copyright 2017 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/chrome_build.gni") +import("//build/config/ios/rules.gni") +import("//build/mac/tweak_info_plist.gni") +import("//build/util/process_version.gni") +import("//remoting/build/config/remoting_build.gni") +import("//remoting/credits/credits.gni") + +# TODO(yuweih): Temporary flag. Remove once it rolls into downstream. +declare_args() { + supports_app_initializer = true +} + +_remoting_ios_app_source_dir = get_path_info("./", "abspath") + +# Arguments +# +# output_name: +# string, the filename of the generated .app folder +# +# info_plist_path: +# string, path of the Info.plist template +# +# entitlements_path: +# string, path of the .entitlements file +# +# deps: +# string array, deps to be compiled. E.g. source sets, launch screen, icons. +# +# bundle_id: +# (optional) string, the bundle_id. If this is not set, it will come from +# either branding_Chromium or branding_Chrome +template("ios_remoting_app_tmpl") { + _app_target_name = target_name + _info_plist_target_name = "${target_name}_tweak_info_plist" + tweak_info_plist(_info_plist_target_name) { + info_plist = invoker.info_plist_path + args = [ "--platform=ios" ] + } + + _launchscreen_storyboard_target_name = + "${target_name}_launchscreen_storyboard" + bundle_data_ib_file(_launchscreen_storyboard_target_name) { + source = rebase_path("resources/LaunchScreen.storyboard", + ".", + _remoting_ios_app_source_dir) + } + + # Compiles the credits files into the gen directory. + _credits_resources_target_name = "${target_name}_credits_resources" + remoting_credits(_credits_resources_target_name) { + app_target_gen_dir = get_label_info(":$_app_target_name", "target_gen_dir") + credits_gen_dir = + "${app_target_gen_dir}/${_app_target_name}_credits_resources" + target_dir = get_path_info("./", "abspath") + gn_target = "${target_dir}:${_app_target_name}" + } + + # Adds the compiled credits files into the bundle. + _credits_bundle_target_name = "${target_name}_credits_bundle" + bundle_data(_credits_bundle_target_name) { + sources = get_target_outputs(":$_credits_resources_target_name") + public_deps = [ + ":$_credits_resources_target_name", + ] + outputs = [ + "{{bundle_resources_dir}}/{{source_file_part}}", + ] + } + + ios_app_bundle(target_name) { + output_name = invoker.output_name + + entitlements_path = invoker.entitlements_path + info_plist_target = ":$_info_plist_target_name" + + if (defined(invoker.bundle_id)) { + bundle_id = invoker.bundle_id + } else { + bundle_id = remoting_ios_bundle_id + } + + extra_substitutions = [ + "BUNDLE_IDENTIFIER=$bundle_id", + "DISPLAY_NAME=$remoting_ios_display_name", + "EXECUTABLE_NAME=$output_name", + "MINIMUM_OS_VERSION=7.0", + "PRODUCT_NAME=$output_name", + "VERSION_FULL=$remoting_version_full", + "VERSION_SHORT=$remoting_version_short", + ] + + libs = [ + "Accelerate.framework", + "AudioToolbox.framework", + "CoreAudio.framework", + "CoreData.framework", + "CoreMIDI.framework", + "CoreVideo.framework", + "GLKit.framework", + "OpenGLES.framework", + "Webkit.framework", + "SafariServices.framework", + "SystemConfiguration.framework", + ] + + deps = invoker.deps + + bundle_deps = [ + ":$_launchscreen_storyboard_target_name", + ":$_credits_bundle_target_name", + ] + + assert_no_deps = [ "//third_party/ffmpeg:*" ] + } +} diff --git a/chromium/remoting/ios/app/resources/BUILD.gn b/chromium/remoting/ios/app/resources/BUILD.gn index 5f15eb31c95..71f593c5513 100644 --- a/chromium/remoting/ios/app/resources/BUILD.gn +++ b/chromium/remoting/ios/app/resources/BUILD.gn @@ -3,56 +3,75 @@ # found in the LICENSE file. import("//build/config/chrome_build.gni") +import("//build/config/ios/imageset.gni") import("//build/config/ios/rules.gni") import("//remoting/build/config/remoting_build.gni") -bundle_data("assets") { +group("assets") { + public_deps = [ + ":Background", + "//third_party/material_design_icons:ic_arrow_forward_white", + "//third_party/material_design_icons:ic_check_box_outline_blank_white", + "//third_party/material_design_icons:ic_check_box_white", + "//third_party/material_design_icons:ic_chevron_left_white_36pt", + "//third_party/material_design_icons:ic_close_white", + "//third_party/material_design_icons:ic_desktop_windows_white", + "//third_party/material_design_icons:ic_feedback", + "//third_party/material_design_icons:ic_help", + "//third_party/material_design_icons:ic_menu_white", + "//third_party/material_design_icons:ic_radio_button_checked_white", + "//third_party/material_design_icons:ic_radio_button_unchecked_white", + "//third_party/material_design_icons:ic_refresh_white", + "//third_party/material_design_icons:ic_settings_white", + + # Note: those assets seems to be unreferenced by the code, according to + # grep. Maybe they are in downstream repository, so leaving them for now. + "//third_party/material_design_icons:ic_desktop_windows", + "//third_party/material_design_icons:ic_fullscreen", + "//third_party/material_design_icons:ic_fullscreen_exit", + "//third_party/material_design_icons:ic_mouse", + "//third_party/material_design_icons:ic_touch_app", + ] +} + +imageset("Background") { sources = [ - "Assets.xcassets/ic_desktop.imageset/Contents.json", - "Assets.xcassets/ic_desktop.imageset/ic_desktop.png", - "Assets.xcassets/ic_desktop.imageset/ic_desktop@2x.png", - "Assets.xcassets/ic_desktop.imageset/ic_desktop@3x.png", - "Assets.xcassets/ic_desktop_windows.imageset/Contents.json", - "Assets.xcassets/ic_desktop_windows.imageset/ic_desktop_windows.png", - "Assets.xcassets/ic_desktop_windows.imageset/ic_desktop_windows@2x.png", - "Assets.xcassets/ic_desktop_windows.imageset/ic_desktop_windows@3x.png", - "Assets.xcassets/ic_fullscreen.imageset/Contents.json", - "Assets.xcassets/ic_fullscreen.imageset/ic_fullscreen.png", - "Assets.xcassets/ic_fullscreen.imageset/ic_fullscreen@2x.png", - "Assets.xcassets/ic_fullscreen.imageset/ic_fullscreen@3x.png", - "Assets.xcassets/ic_fullscreen_exit.imageset/Contents.json", - "Assets.xcassets/ic_fullscreen_exit.imageset/ic_fullscreen_exit.png", - "Assets.xcassets/ic_fullscreen_exit.imageset/ic_fullscreen_exit@2x.png", - "Assets.xcassets/ic_fullscreen_exit.imageset/ic_fullscreen_exit@3x.png", - "Assets.xcassets/ic_mouse.imageset/Contents.json", - "Assets.xcassets/ic_mouse.imageset/ic_mouse.png", - "Assets.xcassets/ic_mouse.imageset/ic_mouse@2x.png", - "Assets.xcassets/ic_mouse.imageset/ic_mouse@3x.png", - "Assets.xcassets/ic_touch_app.imageset/Contents.json", - "Assets.xcassets/ic_touch_app.imageset/ic_touch_app.png", - "Assets.xcassets/ic_touch_app.imageset/ic_touch_app_2x.png", - "Assets.xcassets/ic_touch_app.imageset/ic_touch_app_3x.png", + "Assets.xcassets/Background.imageset/Contents.json", + "Assets.xcassets/Background.imageset/bkg1.jpg", + "Assets.xcassets/Background.imageset/bkg1_2x.jpg", ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", +} + +# TODO(yuweih): This target is used to exclude material design imagesets from +# the internal app's source set, that are already pulled-in by other deps of the +# internal app. We will need to redesign these once crbug.com/734054 is +# resolved. +group("system_icons") { +} + +group("launchscreen_assets") { + public_deps = [ + ":launchscreen_app_logo", + ":launchscreen_brand_name", ] } -bundle_data("launchscreen_assets") { +imageset("launchscreen_app_logo") { sources = [ - "launchscreen_images.xcassets/Contents.json", "launchscreen_images.xcassets/launchscreen_app_logo.imageset/Contents.json", "launchscreen_images.xcassets/launchscreen_app_logo.imageset/launchscreen_app_logo.png", "launchscreen_images.xcassets/launchscreen_app_logo.imageset/launchscreen_app_logo@2x.png", "launchscreen_images.xcassets/launchscreen_app_logo.imageset/launchscreen_app_logo@3x.png", + ] +} + +imageset("launchscreen_brand_name") { + sources = [ "launchscreen_images.xcassets/launchscreen_brand_name.imageset/Contents.json", "launchscreen_images.xcassets/launchscreen_brand_name.imageset/launchscreen_brand_name.png", "launchscreen_images.xcassets/launchscreen_brand_name.imageset/launchscreen_brand_name@2x.png", "launchscreen_images.xcassets/launchscreen_brand_name.imageset/launchscreen_brand_name@3x.png", ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] } bundle_data("remoting_icons") { diff --git a/chromium/remoting/ios/app/settings/BUILD.gn b/chromium/remoting/ios/app/settings/BUILD.gn new file mode 100644 index 00000000000..66dcdb08509 --- /dev/null +++ b/chromium/remoting/ios/app/settings/BUILD.gn @@ -0,0 +1,33 @@ +# Copyright 2017 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/chrome_build.gni") +import("//build/config/ios/rules.gni") +import("//build/mac/tweak_info_plist.gni") +import("//build/util/process_version.gni") +import("//remoting/build/config/remoting_build.gni") + +source_set("settings") { + sources = [ + "remoting_settings_view_controller.h", + "remoting_settings_view_controller.mm", + "setting_option.h", + "setting_option.mm", + ] + + deps = [ + "//base", + "//remoting/base", + "//remoting/ios:ios_core", + "//ui/base", + "//ui/gfx", + "//ui/resources", + ] + + public_deps = [ + "//ios/third_party/material_components_ios", + ] + + configs += [ "//build/config/compiler:enable_arc" ] +} diff --git a/chromium/remoting/ios/display/BUILD.gn b/chromium/remoting/ios/display/BUILD.gn index a1e2a3baa53..53795749bd8 100644 --- a/chromium/remoting/ios/display/BUILD.gn +++ b/chromium/remoting/ios/display/BUILD.gn @@ -18,6 +18,8 @@ group("all_test") { source_set("display") { sources = [ + "eagl_view.h", + "eagl_view.mm", "gl_demo_screen.h", "gl_demo_screen.mm", "gl_display_handler.h", @@ -27,7 +29,7 @@ source_set("display") { public_deps = [ "//remoting/client", "//third_party/protobuf:protobuf_lite", - "//third_party/webrtc/base:rtc_base_approved", + "//third_party/webrtc/rtc_base:rtc_base_approved", ] deps = [ diff --git a/chromium/remoting/ios/domain/BUILD.gn b/chromium/remoting/ios/domain/BUILD.gn index 4f7085115e2..238f6fc34ac 100644 --- a/chromium/remoting/ios/domain/BUILD.gn +++ b/chromium/remoting/ios/domain/BUILD.gn @@ -12,6 +12,8 @@ source_set("domain") { "client_session_details.mm", "host_info.h", "host_info.mm", + "host_settings.h", + "host_settings.mm", "user_info.h", "user_info.mm", ] diff --git a/chromium/remoting/ios/facade/BUILD.gn b/chromium/remoting/ios/facade/BUILD.gn index bbc9b1c0fdf..c2f6623e429 100644 --- a/chromium/remoting/ios/facade/BUILD.gn +++ b/chromium/remoting/ios/facade/BUILD.gn @@ -15,7 +15,8 @@ source_set("facade") { "ios_client_runtime_delegate.h", "ios_client_runtime_delegate.mm", "remoting_authentication.h", - "remoting_authentication.mm", + "remoting_oauth_authentication.h", + "remoting_oauth_authentication.mm", "remoting_service.h", "remoting_service.mm", ] @@ -24,6 +25,7 @@ source_set("facade") { "//base", "//remoting/base:authorization", "//remoting/ios/domain", + "//remoting/ios/persistence", ] configs += [ "//build/config/compiler:enable_arc" ] diff --git a/chromium/remoting/ios/mdc/BUILD.gn b/chromium/remoting/ios/mdc/BUILD.gn new file mode 100644 index 00000000000..a283c214f11 --- /dev/null +++ b/chromium/remoting/ios/mdc/BUILD.gn @@ -0,0 +1,20 @@ +# Copyright 2017 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/chrome_build.gni") +import("//build/config/ios/rules.gni") +import("//remoting/build/config/remoting_build.gni") + +source_set("mdc") { + sources = [ + "MDCActionImageView.h", + "MDCActionImageView.m", + ] + + deps = [ + "//ios/third_party/material_components_ios", + ] + + configs += [ "//build/config/compiler:enable_arc" ] +} diff --git a/chromium/remoting/ios/persistence/BUILD.gn b/chromium/remoting/ios/persistence/BUILD.gn new file mode 100644 index 00000000000..54afc44a65f --- /dev/null +++ b/chromium/remoting/ios/persistence/BUILD.gn @@ -0,0 +1,21 @@ +# Copyright 2017 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/chrome_build.gni") +import("//build/config/ios/rules.gni") +import("//remoting/build/config/remoting_build.gni") + +source_set("persistence") { + sources = [ + "remoting_preferences.h", + "remoting_preferences.mm", + ] + + deps = [ + "//base", + "//remoting/ios/domain", + ] + + configs += [ "//build/config/compiler:enable_arc" ] +} diff --git a/chromium/remoting/proto/BUILD.gn b/chromium/remoting/proto/BUILD.gn index 64e0f2304a8..b1c520aaf3a 100644 --- a/chromium/remoting/proto/BUILD.gn +++ b/chromium/remoting/proto/BUILD.gn @@ -19,6 +19,7 @@ proto_library("proto") { "internal.proto", "mux.proto", "process_stats.proto", + "test.proto", "video.proto", "video_stats.proto", ] diff --git a/chromium/remoting/protocol/BUILD.gn b/chromium/remoting/protocol/BUILD.gn index f9d4099c6b8..b38627d087c 100644 --- a/chromium/remoting/protocol/BUILD.gn +++ b/chromium/remoting/protocol/BUILD.gn @@ -49,6 +49,8 @@ static_library("protocol") { "content_description.cc", "content_description.h", "datagram_channel_factory.h", + "data_channel_manager.cc", + "data_channel_manager.h", "errors.cc", "errors.h", "frame_consumer.h", @@ -104,6 +106,8 @@ static_library("protocol") { "monitored_video_stub.h", "mouse_input_filter.cc", "mouse_input_filter.h", + "named_message_pipe_handler.cc", + "named_message_pipe_handler.h", "negotiating_authenticator_base.cc", "negotiating_authenticator_base.h", "negotiating_client_authenticator.cc", @@ -266,6 +270,10 @@ static_library("test_support") { "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", @@ -309,7 +317,9 @@ source_set("unit_tests") { "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", diff --git a/chromium/remoting/test/BUILD.gn b/chromium/remoting/test/BUILD.gn index 7aa0a1193f0..d3d0db841a1 100644 --- a/chromium/remoting/test/BUILD.gn +++ b/chromium/remoting/test/BUILD.gn @@ -194,6 +194,7 @@ if (enable_remoting_host && !is_android && !is_chromeos) { deps = [ ":it2me_standalone_host", + "//build/config:exe_and_shlib_deps", ] if (is_desktop_linux) { diff --git a/chromium/remoting/tools/build/remoting_localize.gni b/chromium/remoting/tools/build/remoting_localize.gni index 54ff46e27f8..53e802380bc 100644 --- a/chromium/remoting/tools/build/remoting_localize.gni +++ b/chromium/remoting/tools/build/remoting_localize.gni @@ -76,7 +76,7 @@ template("remoting_localize") { foreach(i, invoker.variables) { args += [ "--variables", - i, + rebase_path(i, root_build_dir), ] } } -- cgit v1.2.1