summaryrefslogtreecommitdiff
path: root/chromium/remoting
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2016-11-10 14:06:09 +0100
committerMichal Klocek <michal.klocek@qt.io>2016-11-16 13:45:02 +0000
commit777da810b25f517d54dc4b7771e42a4ea38c355b (patch)
tree675d9f4b67f68441adffb9a01e3075d8d12c0fb2 /chromium/remoting
parent2eb1e44ebb98208ec9bd0acb0c410e95e8f253b9 (diff)
downloadqtwebengine-chromium-777da810b25f517d54dc4b7771e42a4ea38c355b.tar.gz
Add all gn, gni, typemap, mojom files
These file are required to gn be able to parse source tree. Change-Id: I9cb4a0b3897c1e99dd6e39832a8c55764fb6e1c6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/remoting')
-rw-r--r--chromium/remoting/BUILD.gn227
-rw-r--r--chromium/remoting/android/BUILD.gn221
-rw-r--r--chromium/remoting/android/client_java_tmpl.gni99
-rw-r--r--chromium/remoting/android/remoting_apk_tmpl.gni21
-rw-r--r--chromium/remoting/base/BUILD.gn96
-rw-r--r--chromium/remoting/client/BUILD.gn95
-rw-r--r--chromium/remoting/client/opengl/BUILD.gn14
-rw-r--r--chromium/remoting/client/plugin/BUILD.gn57
-rw-r--r--chromium/remoting/codec/BUILD.gn70
-rw-r--r--chromium/remoting/host/BUILD.gn1561
-rw-r--r--chromium/remoting/host/it2me/BUILD.gn149
-rw-r--r--chromium/remoting/host/native_messaging/BUILD.gn19
-rw-r--r--chromium/remoting/host/predefines_win.gni20
-rw-r--r--chromium/remoting/host/setup/BUILD.gn30
-rw-r--r--chromium/remoting/proto/BUILD.gn16
-rw-r--r--chromium/remoting/protocol/BUILD.gn130
-rw-r--r--chromium/remoting/remoting_enable.gni23
-rw-r--r--chromium/remoting/remoting_locales.gni158
-rw-r--r--chromium/remoting/remoting_options.gni45
-rw-r--r--chromium/remoting/remoting_srcs.gni14
-rw-r--r--chromium/remoting/remoting_version.gni46
-rw-r--r--chromium/remoting/resources/BUILD.gn146
-rw-r--r--chromium/remoting/signaling/BUILD.gn75
-rw-r--r--chromium/remoting/test/BUILD.gn225
-rw-r--r--chromium/remoting/tools/build/remoting_localize.gni113
-rw-r--r--chromium/remoting/tools/javascript_key_tester/BUILD.gn48
-rw-r--r--chromium/remoting/tools/javascript_key_tester/pnacl/BUILD.gn18
-rw-r--r--chromium/remoting/webapp/BUILD.gn108
-rw-r--r--chromium/remoting/webapp/build_template.gni299
-rw-r--r--chromium/remoting/webapp/files.gni572
30 files changed, 4715 insertions, 0 deletions
diff --git a/chromium/remoting/BUILD.gn b/chromium/remoting/BUILD.gn
new file mode 100644
index 00000000000..010ac717e45
--- /dev/null
+++ b/chromium/remoting/BUILD.gn
@@ -0,0 +1,227 @@
+# Copyright 2015 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("//build/config/ui.gni")
+import("//build/util/version.gni")
+import("//remoting/remoting_enable.gni")
+import("//remoting/remoting_options.gni")
+import("//remoting/remoting_version.gni")
+import("//testing/test.gni")
+
+# TODO(nicholss): Move this and other defines to version.h.in.
+# Various remoting targets need this version definition.
+config("version") {
+ defines = [ "VERSION=$chrome_version_full" ]
+}
+
+config("enable_webrtc_remoting_client") {
+ if (!is_official_build && !is_nacl) {
+ defines = [ "ENABLE_WEBRTC_REMOTING_CLIENT=1" ]
+ }
+}
+
+group("remoting_all") {
+ testonly = true
+
+ deps = [
+ "//remoting:remoting_unittests",
+ "//remoting/test:chromoting_test_driver",
+ "//remoting/webapp:browser_test_resources",
+ "//remoting/webapp:unit_tests",
+ ]
+
+ if ((is_linux && !is_chromeos) || is_win || is_mac) {
+ deps += [ "//remoting/webapp" ]
+ }
+
+ if (is_win) {
+ deps += [
+ "//remoting:remoting_breakpad_tester",
+ "//remoting/host:remoting_console",
+ "//remoting/host:remoting_desktop",
+ ]
+
+ if (is_chrome_branded) {
+ deps += [ "//remoting/host:remoting_host_installation" ]
+ }
+ }
+
+ if (is_android) {
+ deps += [
+ "//remoting/android:remoting_apk",
+ "//remoting/android:remoting_test_apk",
+ ]
+ }
+
+ if (enable_remoting_host) {
+ deps += [
+ "//remoting:remoting_perftests",
+ "//remoting/host",
+ ]
+
+ if (!is_chromeos && !is_android) {
+ deps += [
+ "//remoting/host:remoting_native_messaging_manifests",
+ "//remoting/host:remoting_start_host",
+ "//remoting/host/it2me:remote_assistance_host",
+ ]
+ }
+
+ # The same target is called differently on Linux.
+ # TODO(sergeyu): Rename it to remoting_native_messaging_host on all
+ # platforms.
+ if (is_win) {
+ deps += [ "//remoting/host:remoting_native_messaging_host" ]
+ } else if (!is_chromeos && !is_android) {
+ deps += [ "//remoting/host:native_messaging_host" ]
+ }
+
+ if (is_linux && !is_chromeos) {
+ deps += [ "//remoting/host:remoting_dev_me2me_host" ]
+ }
+ }
+
+ if (enable_me2me_host) {
+ deps += [ "//remoting/host:remoting_me2me_host" ]
+ if (is_chrome_branded) {
+ deps += [ "//remoting/host:remoting_me2me_host_archive" ]
+ }
+ }
+
+ if (enable_nacl) {
+ deps += [ "//remoting/tools/javascript_key_tester" ]
+ }
+}
+
+if (is_win) {
+ # GYP version: remoting/remoting_host_win.gypi:remoting_breakpad_tester
+ executable("remoting_breakpad_tester") {
+ deps = [
+ "//base",
+ "//build/win:default_exe_manifest",
+ "//remoting/host",
+ ]
+
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+
+ sources = [
+ "tools/breakpad_tester_win.cc",
+ ]
+ }
+}
+
+# GYP version: remoting/remoting_test.gypi:remoting_test_support
+source_set("test_support") {
+ testonly = true
+
+ deps = [
+ "//base",
+ "//net",
+ "//remoting/base",
+ "//remoting/client",
+ "//remoting/codec",
+ "//remoting/protocol:test_support",
+ "//remoting/resources",
+ "//remoting/signaling:test_support",
+ "//remoting/test:test_support",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+
+ if (enable_configuration_policy) {
+ deps += [
+ "//components/policy:test_support",
+
+ # TODO(zijiehe): This should belong to //components/policy:test_support
+ "//components/prefs",
+ ]
+ }
+
+ if (enable_remoting_host) {
+ deps += [ "//remoting/host:test_support" ]
+ }
+}
+
+test("remoting_unittests") {
+ defines = []
+ libs = []
+
+ configs += [
+ ":version",
+
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ "//build/config/compiler:no_size_t_to_int_warning",
+ ]
+
+ deps = [
+ ":test_support",
+ "//base",
+ "//google_apis",
+ "//remoting/base:unit_tests",
+ "//remoting/client:unit_tests",
+ "//remoting/protocol:unit_tests",
+ "//remoting/signaling:unit_tests",
+ "//remoting/test:unit_tests",
+ "//testing/gmock",
+ "//testing/gtest",
+ "//third_party/webrtc",
+ ]
+
+ if (enable_remoting_host) {
+ deps += [
+ "//remoting/codec:unit_tests",
+ "//remoting/host:unit_tests",
+ "//ui/gfx",
+ ]
+ }
+
+ if (enable_webrtc) {
+ deps += [ "//third_party/libjingle:libjingle_webrtc" ]
+ }
+
+ if (is_android) {
+ deps += [ "//net/android:net_java" ]
+ }
+
+ if (is_win) {
+ defines += [ "_ALT_NO_EXCEPTIONS" ]
+
+ libs += [
+ "rpcrt4.lib",
+ "wtsapi32.lib",
+ ]
+ }
+
+ if (enable_configuration_policy) {
+ deps += [ "//components/policy:policy_component_test_support" ]
+ }
+}
+
+if (enable_remoting_host) {
+ test("remoting_perftests") {
+ sources = [
+ "test/codec_perftest.cc",
+ "test/protocol_perftest.cc",
+ ]
+
+ configs += [ ":version" ]
+
+ deps = [
+ ":test_support",
+ "//base",
+ "//base/test:run_all_unittests",
+ "//base/test:test_support",
+ "//net:test_support",
+ "//remoting/base",
+ "//testing/gtest",
+ "//third_party/libjingle",
+ "//third_party/webrtc/modules/desktop_capture",
+ ]
+
+ if (enable_webrtc) {
+ deps += [ "//third_party/libjingle:libjingle_webrtc" ]
+ }
+ }
+}
diff --git a/chromium/remoting/android/BUILD.gn b/chromium/remoting/android/BUILD.gn
new file mode 100644
index 00000000000..45a184b84a3
--- /dev/null
+++ b/chromium/remoting/android/BUILD.gn
@@ -0,0 +1,221 @@
+# Copyright 2015 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/android/config.gni")
+import("//build/config/android/rules.gni")
+import("//remoting/android/client_java_tmpl.gni")
+import("//remoting/android/remoting_apk_tmpl.gni")
+import("//remoting/remoting_options.gni")
+import("//remoting/tools/build/remoting_localize.gni")
+
+generate_jni("jni_headers") {
+ sources = [
+ "host/src/org/chromium/chromoting/host/jni/Host.java",
+ "java/src/org/chromium/chromoting/jni/Client.java",
+ "java/src/org/chromium/chromoting/jni/Display.java",
+ "java/src/org/chromium/chromoting/jni/JniInterface.java",
+ "java/src/org/chromium/chromoting/jni/TouchEventData.java",
+ ]
+ jni_package = "remoting"
+}
+
+shared_library("remoting_client_jni") {
+ deps = [
+ "//remoting/android:jni_headers",
+ "//remoting/base",
+ "//remoting/client",
+ "//remoting/protocol",
+ "//ui/events:dom_keycode_converter",
+ "//ui/gfx",
+ ]
+ sources = [
+ "//remoting/client/audio_player_android.cc",
+ "//remoting/client/audio_player_android.h",
+ "//remoting/client/jni/android_keymap.cc",
+ "//remoting/client/jni/android_keymap.h",
+ "//remoting/client/jni/chromoting_jni_instance.cc",
+ "//remoting/client/jni/chromoting_jni_instance.h",
+ "//remoting/client/jni/chromoting_jni_runtime.cc",
+ "//remoting/client/jni/chromoting_jni_runtime.h",
+ "//remoting/client/jni/display_updater_factory.h",
+ "//remoting/client/jni/egl_thread_context.cc",
+ "//remoting/client/jni/egl_thread_context.h",
+ "//remoting/client/jni/jni_client.cc",
+ "//remoting/client/jni/jni_client.h",
+ "//remoting/client/jni/jni_display_handler.cc",
+ "//remoting/client/jni/jni_display_handler.h",
+ "//remoting/client/jni/jni_gl_display_handler.cc",
+ "//remoting/client/jni/jni_gl_display_handler.h",
+ "//remoting/client/jni/jni_pairing_secret_fetcher.cc",
+ "//remoting/client/jni/jni_pairing_secret_fetcher.h",
+ "//remoting/client/jni/jni_touch_event_data.cc",
+ "//remoting/client/jni/jni_touch_event_data.h",
+ "//remoting/client/jni/jni_video_renderer.cc",
+ "//remoting/client/jni/jni_video_renderer.h",
+ "//remoting/client/jni/remoting_jni_onload.cc",
+ "//remoting/client/jni/remoting_jni_registrar.cc",
+ "//remoting/client/jni/remoting_jni_registrar.h",
+ ]
+ libs = [
+ "OpenSLES",
+ "EGL",
+ ]
+ configs += [ "//remoting:enable_webrtc_remoting_client" ]
+}
+
+_raw_resources_base_dir = "$target_gen_dir/remoting_android_raw_resources/res"
+copy("remoting_android_raw_resources") {
+ _credits_html = get_label_info("//remoting/webapp:credits",
+ "target_gen_dir") + "/credits.html"
+ sources = [
+ "//remoting/webapp/base/html/credits_css.css",
+ "//remoting/webapp/base/html/main.css",
+ "//remoting/webapp/base/js/credits_js.js",
+ _credits_html,
+ ]
+ outputs = [
+ "$_raw_resources_base_dir/raw/{{source_file_part}}",
+ ]
+ deps = [
+ "//remoting/webapp:credits",
+ ]
+}
+
+remoting_localize("remoting_apk_manifest") {
+ sources = [
+ "java/AndroidManifest.xml.jinja2",
+ ]
+ locales = [ "en" ]
+ if (remoting_enable_cardboard) {
+ defines = [ "ENABLE_CARDBOARD=1" ]
+ } else {
+ defines = [ "ENABLE_CARDBOARD=0" ]
+ }
+ variables = [ rebase_path(branding_path) ]
+ output = "$root_gen_dir/remoting/android/{{source_name_part}}"
+}
+
+android_resources("remoting_android_client_java_resources") {
+ custom_package = "org.chromium.chromoting"
+ resource_dirs = [ "java/res" ]
+ generated_resource_dirs = [ _raw_resources_base_dir ]
+ generated_resource_files =
+ get_target_outputs(":remoting_android_raw_resources")
+
+ deps = [
+ ":remoting_android_raw_resources",
+ "//remoting/resources:strings_java",
+ "//third_party/android_tools:android_support_v7_appcompat_resources",
+ ]
+}
+
+remoting_android_client_java_tmpl("remoting_android_client_java") {
+ remoting_google_play_services_library = google_play_services_library
+}
+
+if (current_cpu == "arm") {
+ action("remoting_cardboard_extract_native_lib") {
+ script = "//remoting/tools/extract_android_native_lib.py"
+ sources = [
+ "//third_party/cardboard-java/src/CardboardSample/libs/cardboard.jar",
+ ]
+ outputs = [
+ "$root_out_dir/libvrtoolkit.so",
+ ]
+ args = [ android_app_abi ]
+ args += rebase_path(sources, root_build_dir)
+ args += rebase_path(outputs, root_build_dir)
+ }
+}
+
+remoting_apk_tmpl("remoting_apk") {
+ apk_name = "Chromoting"
+ java_files = [ "//remoting/android/apk/src/org/chromium/chromoting/RemotingApplication.java" ]
+ deps = [
+ ":remoting_android_client_java",
+ "//base:base_java",
+ "//net/android:net_java",
+ ]
+}
+
+remoting_localize("remoting_test_apk_manifest") {
+ sources = [
+ "javatests/AndroidManifest.xml.jinja2",
+ ]
+ locales = [ "en" ]
+ variables = [ rebase_path(branding_path) ]
+ output = "$root_gen_dir/remoting/android_test/{{source_name_part}}"
+}
+
+instrumentation_test_apk("remoting_test_apk") {
+ android_manifest = "$root_gen_dir/remoting/android_test/AndroidManifest.xml"
+ android_manifest_dep = ":remoting_test_apk_manifest"
+ apk_name = "ChromotingTest"
+ apk_under_test = ":remoting_apk"
+ java_files = [
+ "javatests/src/org/chromium/chromoting/EventTest.java",
+ "javatests/src/org/chromium/chromoting/MockInputStub.java",
+ "javatests/src/org/chromium/chromoting/SwipePinchDetectorTest.java",
+ "javatests/src/org/chromium/chromoting/TapGestureDetectorTest.java",
+ "javatests/src/org/chromium/chromoting/TouchEventBuilder.java",
+ "javatests/src/org/chromium/chromoting/TouchEventGenerator.java",
+ "javatests/src/org/chromium/chromoting/TouchInputStrategyTest.java",
+ "javatests/src/org/chromium/chromoting/test/util/MutableReference.java",
+ ]
+ deps = [
+ ":remoting_android_client_java",
+ "//base:base_java",
+ "//base:base_java_test_support",
+ ]
+}
+
+shared_library("remoting_host_jni") {
+ deps = [
+ ":jni_headers",
+ "//google_apis",
+ "//remoting/base",
+ "//remoting/host",
+ "//remoting/host/it2me:common",
+ "//remoting/protocol",
+ ]
+ sources = [
+ "//remoting/host/android/jni_host.cc",
+ "//remoting/host/android/jni_host.h",
+ "//remoting/host/android/remoting_host_jni_onload.cc",
+ "//remoting/host/android/remoting_host_jni_registrar.cc",
+ "//remoting/host/android/remoting_host_jni_registrar.h",
+ ]
+}
+
+android_resources("remoting_host_apk_resources") {
+ custom_package = "org.chromium.chromoting.host"
+ resource_dirs = [ "host/res" ]
+ deps = [
+ "//third_party/android_tools:android_support_v7_appcompat_resources",
+ ]
+}
+
+android_apk("remoting_host_apk") {
+ apk_name = "ChromotingHost"
+ android_manifest = "host/AndroidManifest.xml"
+ shared_libraries = [ ":remoting_host_jni" ]
+ _java_file_prefix = "host/src/org/chromium/chromoting/host"
+ _java_files = [
+ "MainActivity.java",
+ "RemotingApplication.java",
+ "jni/Host.java",
+ "jni/It2MeHostObserver.java",
+ ]
+ java_files = rebase_path(_java_files, ".", _java_file_prefix)
+ java_files +=
+ [ "java/src/org/chromium/chromoting/base/OAuthTokenFetcher.java" ]
+ deps = [
+ ":remoting_host_apk_resources",
+ "//base:base_java",
+ "//net/android:net_java",
+ "//third_party/android_tools:android_support_v13_java",
+ "//third_party/android_tools:android_support_v7_appcompat_java",
+ google_play_services_library,
+ ]
+}
diff --git a/chromium/remoting/android/client_java_tmpl.gni b/chromium/remoting/android/client_java_tmpl.gni
new file mode 100644
index 00000000000..f4cb6d72875
--- /dev/null
+++ b/chromium/remoting/android/client_java_tmpl.gni
@@ -0,0 +1,99 @@
+# Copyright 2015 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/android/rules.gni")
+import("//remoting/remoting_options.gni")
+
+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",
+ "CapabilityManager.java",
+ "Chromoting.java",
+ "ChromotingDownloadManager.java",
+ "ChromotingUtil.java",
+ "ClientExtension.java",
+ "Desktop.java",
+ "DesktopCanvas.java",
+ "DesktopView.java",
+ "DesktopViewInterface.java",
+ "DummyActivityLifecycleListener.java",
+ "DummyClientExtension.java",
+ "Event.java",
+ "FeedbackAnimator.java",
+ "FlingAnimationJob.java",
+ "HostInfo.java",
+ "HostListAdapter.java",
+ "HostListManager.java",
+ "InputEventSender.java",
+ "InputModeChangedEventParameter.java",
+ "InputStrategyInterface.java",
+ "InputStub.java",
+ "NavigationMenuAdapter.java",
+ "OAuthTokenConsumer.java",
+ "PaintEventParameter.java",
+ "Preconditions.java",
+ "RenderData.java",
+ "ScaleEventParameter.java",
+ "SessionAuthenticator.java",
+ "SessionConnector.java",
+ "SimulatedTouchInputStrategy.java",
+ "SizeChangedEventParameter.java",
+ "SwipePinchDetector.java",
+ "SystemUiVisibilityChangedEventParameter.java",
+ "TapGestureDetector.java",
+ "ThirdPartyTokenFetcher.java",
+ "TouchEventParameter.java",
+ "TouchInputHandler.java",
+ "TouchInputStrategy.java",
+ "TrackpadInputStrategy.java",
+ "TapEventParameter.java",
+ "TwoPointsEventParameter.java",
+ "accountswitcher/AccountSwitcher.java",
+ "accountswitcher/AccountSwitcherBase.java",
+ "accountswitcher/AccountSwitcherBasic.java",
+ "accountswitcher/AccountSwitcherFactory.java",
+ "base/OAuthTokenFetcher.java",
+ "cardboard/CardboardRenderer.java",
+ "cardboard/CardboardUtil.java",
+ "cardboard/Cursor.java",
+ "cardboard/Desktop.java",
+ "cardboard/DesktopActivity.java",
+ "cardboard/MenuBar.java",
+ "cardboard/MenuItem.java",
+ "cardboard/Photosphere.java",
+ "cardboard/ShaderHelper.java",
+ "cardboard/TextureHelper.java",
+ "help/CreditsActivity.java",
+ "help/HelpActivity.java",
+ "help/HelpAndFeedback.java",
+ "help/HelpAndFeedbackBasic.java",
+ "help/HelpContext.java",
+ "help/HelpSingleton.java",
+ "jni/Client.java",
+ "jni/ConnectionListener.java",
+ "jni/Display.java",
+ "jni/JniInterface.java",
+ "jni/TouchEventData.java",
+ ]
+
+ java_files = rebase_path(_java_files, ".", _java_file_prefix)
+
+ deps = [
+ "//base:base_java",
+ "//remoting/android:remoting_android_client_java_resources",
+ "//third_party/android_tools:android_support_v13_java",
+ "//third_party/android_tools:android_support_v7_appcompat_java",
+ "//third_party/android_tools:android_support_v7_mediarouter_java",
+ "//third_party/cardboard-java",
+ "//ui/android:ui_java",
+ ]
+
+ deps += [ invoker.remoting_google_play_services_library ]
+ }
+}
diff --git a/chromium/remoting/android/remoting_apk_tmpl.gni b/chromium/remoting/android/remoting_apk_tmpl.gni
new file mode 100644
index 00000000000..0cc28b49290
--- /dev/null
+++ b/chromium/remoting/android/remoting_apk_tmpl.gni
@@ -0,0 +1,21 @@
+# Copyright 2015 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/android/rules.gni")
+import("//remoting/remoting_options.gni")
+
+template("remoting_apk_tmpl") {
+ android_apk(target_name) {
+ forward_variables_from(invoker, "*")
+
+ android_manifest = "$root_gen_dir/remoting/android/AndroidManifest.xml"
+ android_manifest_dep = "//remoting/android:remoting_apk_manifest"
+ shared_libraries = [ "//remoting/android:remoting_client_jni" ]
+
+ if (remoting_enable_cardboard && current_cpu == "arm") {
+ deps += [ "//remoting/android:remoting_cardboard_extract_native_lib" ]
+ loadable_modules = [ "$root_out_dir/libvrtoolkit.so" ]
+ }
+ }
+}
diff --git a/chromium/remoting/base/BUILD.gn b/chromium/remoting/base/BUILD.gn
new file mode 100644
index 00000000000..ff2b38f1b0d
--- /dev/null
+++ b/chromium/remoting/base/BUILD.gn
@@ -0,0 +1,96 @@
+# 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("//remoting/remoting_srcs.gni")
+
+source_set("base") {
+ sources = rebase_path(remoting_srcs_gypi_values.remoting_base_sources,
+ ".",
+ "//remoting")
+
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+
+ public_deps = [
+ "//base",
+ "//net",
+ "//remoting/proto",
+ "//third_party/protobuf:protobuf_lite",
+ ]
+ deps = [
+ "//base/third_party/dynamic_annotations",
+ "//third_party/libvpx",
+ "//third_party/libyuv",
+ "//third_party/webrtc/modules/desktop_capture:primitives",
+ "//url",
+ ]
+ if (is_nacl) {
+ sources -= [
+ "chromium_url_request.cc",
+ "chromoting_event.cc",
+ "telemetry_log_writer.cc",
+ "url_request_context_getter.cc",
+ ]
+ }
+}
+
+source_set("breakpad") {
+ sources = [
+ "breakpad.h",
+ "breakpad_linux.cc",
+ "breakpad_mac.mm",
+ "breakpad_win.cc",
+ ]
+
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+
+ deps = [
+ "//base",
+ ]
+
+ if (is_mac) {
+ deps += [ "//breakpad" ]
+ } else if (is_win) {
+ deps += [ "//breakpad:breakpad_handler" ]
+ }
+}
+
+source_set("unit_tests") {
+ testonly = true
+
+ sources = [
+ "auto_thread_task_runner_unittest.cc",
+ "auto_thread_unittest.cc",
+ "breakpad_win_unittest.cc",
+ "buffered_socket_writer_unittest.cc",
+ "capabilities_unittest.cc",
+ "compound_buffer_unittest.cc",
+ "rate_counter_unittest.cc",
+ "rsa_key_pair_unittest.cc",
+ "run_all_unittests.cc",
+ "running_samples_unittest.cc",
+ "telemetry_log_writer_unittest.cc",
+ "test_rsa_key_pair.h",
+ "typed_buffer_unittest.cc",
+ "util_unittest.cc",
+ ]
+
+ deps = [
+ ":base",
+ ":breakpad",
+ "//base",
+ "//net:test_support",
+ "//testing/gmock",
+ "//testing/gtest",
+ "//third_party/libyuv",
+ "//third_party/webrtc/modules/desktop_capture:primitives",
+ ]
+
+ if (is_win || is_mac || is_chromeos) {
+ deps += [ "//breakpad:client" ]
+ }
+
+ if (is_win) {
+ libs = [ "rpcrt4.lib" ] # For UuidCreate in breakpad_win_unittest.cc.
+ }
+}
diff --git a/chromium/remoting/client/BUILD.gn b/chromium/remoting/client/BUILD.gn
new file mode 100644
index 00000000000..d549eee9e12
--- /dev/null
+++ b/chromium/remoting/client/BUILD.gn
@@ -0,0 +1,95 @@
+# 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("//remoting/remoting_srcs.gni")
+
+source_set("client") {
+ # Disabled the source filters because there are _mac files that need to
+ # be compiled on all platforms.
+ set_sources_assignment_filter([])
+ sources = rebase_path(remoting_srcs_gypi_values.remoting_client_sources,
+ ".",
+ "//remoting")
+ set_sources_assignment_filter(sources_assignment_filter)
+
+ configs += [
+ "//build/config/compiler:wexit_time_destructors",
+ "//remoting:version",
+ "//remoting:enable_webrtc_remoting_client",
+ ]
+
+ deps = [
+ "//remoting/base",
+ "//remoting/codec",
+ "//remoting/protocol",
+ "//third_party/libyuv",
+ "//third_party/webrtc/modules/desktop_capture:primitives",
+ ]
+
+ if (is_nacl) {
+ sources -= [
+ "client_status_logger.cc",
+ "client_telemetry_logger.cc",
+ "server_log_entry_client.cc",
+ ]
+ } else {
+ sources += rebase_path(
+ remoting_srcs_gypi_values.remoting_client_standalone_sources,
+ ".",
+ "//remoting")
+ }
+}
+
+source_set("test_support") {
+ testonly = true
+
+ sources = [
+ "fake_audio_consumer.cc",
+ "fake_audio_consumer.h",
+ ]
+
+ public_deps = [
+ "//remoting/protocol:test_support",
+ "//testing/gmock",
+ "//third_party/protobuf:protobuf_lite",
+ ]
+}
+
+source_set("unit_tests") {
+ testonly = true
+
+ # Disabled the source filters because there are _mac files that need to
+ # be compiled on all platforms.
+ set_sources_assignment_filter([])
+ sources = [
+ "audio_decode_scheduler_unittest.cc",
+ "audio_player_unittest.cc",
+ "chromoting_client_runtime_unittest.cc",
+ "client_status_logger_unittest.cc",
+ "client_telemetry_logger_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",
+ "server_log_entry_client_unittest.cc",
+ "software_video_renderer_unittest.cc",
+ "touch_input_scaler_unittest.cc",
+ ]
+ set_sources_assignment_filter(sources_assignment_filter)
+
+ configs += [
+ "//remoting:version",
+ "//remoting:enable_webrtc_remoting_client",
+ ]
+
+ deps = [
+ ":client",
+ ":test_support",
+ "//remoting/proto",
+ "//testing/gmock",
+ "//testing/gtest",
+ "//third_party/webrtc",
+ ]
+}
diff --git a/chromium/remoting/client/opengl/BUILD.gn b/chromium/remoting/client/opengl/BUILD.gn
new file mode 100644
index 00000000000..0a9d785d605
--- /dev/null
+++ b/chromium/remoting/client/opengl/BUILD.gn
@@ -0,0 +1,14 @@
+shaders = [
+ "tex_coord_to_view.vert",
+ "draw_tex.frag",
+]
+
+action("inline_shaders") {
+ script = "../../tools/build/shader_to_header.py"
+ out_path = "${root_gen_dir}/remoting/client/opengl/shaders.h"
+ inputs = shaders
+ outputs = [
+ out_path,
+ ]
+ args = [ rebase_path(out_path) ] + rebase_path(shaders)
+}
diff --git a/chromium/remoting/client/plugin/BUILD.gn b/chromium/remoting/client/plugin/BUILD.gn
new file mode 100644
index 00000000000..109a859b340
--- /dev/null
+++ b/chromium/remoting/client/plugin/BUILD.gn
@@ -0,0 +1,57 @@
+# Copyright 2015 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.
+
+assert(is_nacl,
+ "These targets must only be built using the untrusted NaCl toolchains.")
+
+import("//build/config/features.gni")
+import("//remoting/remoting_srcs.gni")
+
+config("enable_linker_optimization") {
+ ldflags = [ "-Wl,-O1" ]
+}
+
+executable("remoting_client_plugin_newlib") {
+ sources =
+ rebase_path(remoting_srcs_gypi_values.remoting_client_plugin_sources,
+ ".",
+ "//remoting")
+
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+
+ if (is_debug) {
+ # Always enable link-time optimization in debug builds to workaround
+ # crbug.com/538243 .
+ configs += [ ":enable_linker_optimization" ]
+ }
+
+ deps = [
+ "//net",
+ "//ppapi/cpp",
+ "//ppapi/native_client:ppapi_lib",
+ "//remoting/base",
+ "//remoting/client",
+ "//remoting/codec",
+ "//remoting/protocol",
+ "//third_party/libyuv",
+ "//third_party/webrtc/modules/desktop_capture:primitives",
+ "//ui/events:dom_keycode_converter",
+ ]
+
+ include_dirs = [ "//ppapi/lib/gl/include" ]
+}
+
+if (enable_nacl && is_debug) {
+ copy("remoting_client_plugin_newlib_debug") {
+ public_deps = [
+ ":remoting_client_plugin_newlib",
+ ]
+ sources = [
+ "$root_out_dir/exe.unstripped/remoting_client_plugin_newlib.pexe",
+ ]
+ outputs = [
+ "$root_out_dir/remoting_client_plugin_newlib.pexe.debug",
+ ]
+ }
+}
diff --git a/chromium/remoting/codec/BUILD.gn b/chromium/remoting/codec/BUILD.gn
new file mode 100644
index 00000000000..1cde72da41e
--- /dev/null
+++ b/chromium/remoting/codec/BUILD.gn
@@ -0,0 +1,70 @@
+# Copyright 2015 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("//remoting/remoting_srcs.gni")
+
+source_set("codec") {
+ sources = rebase_path(remoting_srcs_gypi_values.remoting_codec_sources,
+ ".",
+ "//remoting")
+
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+
+ deps = [
+ "//base/third_party/dynamic_annotations",
+ "//media",
+ "//media:shared_memory_support",
+ "//remoting/proto",
+ "//third_party/libvpx",
+ "//third_party/libyuv",
+ "//third_party/opus",
+ "//third_party/webrtc/modules/desktop_capture:primitives",
+ ]
+
+ if (is_nacl) {
+ deps -= [
+ "//media",
+ "//media:shared_memory_support",
+ ]
+ sources -= [
+ "audio_encoder.h",
+ "audio_encoder_opus.cc",
+ "audio_encoder_opus.h",
+ "audio_encoder_verbatim.cc",
+ "audio_encoder_verbatim.h",
+ "video_encoder.cc",
+ "video_encoder.h",
+ "video_encoder_helper.cc",
+ "video_encoder_helper.h",
+ "video_encoder_verbatim.cc",
+ "video_encoder_verbatim.h",
+ "video_encoder_vpx.cc",
+ "video_encoder_vpx.h",
+ "webrtc_video_encoder_vpx.cc",
+ "webrtc_video_encoder_vpx.h",
+ ]
+ }
+}
+
+source_set("unit_tests") {
+ testonly = true
+
+ sources = [
+ "audio_encoder_opus_unittest.cc",
+ "codec_test.cc",
+ "codec_test.h",
+ "video_decoder_vpx_unittest.cc",
+ "video_encoder_helper_unittest.cc",
+ "video_encoder_verbatim_unittest.cc",
+ "video_encoder_vpx_unittest.cc",
+ ]
+
+ deps = [
+ ":codec",
+ "//base",
+ "//remoting/proto",
+ "//testing/gtest",
+ "//third_party/webrtc/modules/desktop_capture",
+ ]
+}
diff --git a/chromium/remoting/host/BUILD.gn b/chromium/remoting/host/BUILD.gn
new file mode 100644
index 00000000000..e85af02ada4
--- /dev/null
+++ b/chromium/remoting/host/BUILD.gn
@@ -0,0 +1,1561 @@
+# 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("//build/config/ui.gni")
+import("//build/config/win/manifest.gni")
+import("//build/util/version.gni")
+import("//chrome/version.gni")
+import("//remoting/remoting_enable.gni")
+import("//remoting/remoting_locales.gni")
+import("//remoting/remoting_options.gni")
+import("//remoting/remoting_srcs.gni")
+import("//remoting/remoting_version.gni")
+import("//remoting/tools/build/remoting_localize.gni")
+
+process_version("remoting_version") {
+ template_file = "//remoting/host/version.h.in"
+ sources = [
+ branding_path,
+ ]
+ output = "$target_gen_dir/version.h"
+}
+
+if (is_win) {
+ import("//remoting/host/predefines_win.gni")
+} else if (is_mac) {
+ import("//build/config/mac/rules.gni")
+}
+
+# Reference this manifest to indicate that a process is per-monitor DPI aware.
+dpi_aware_manifest = "//remoting/host/win/dpi_aware.manifest"
+
+# Depending on this target gives a default executable manifest with the addition
+# of the DPI aware tag.
+windows_manifest("dpi_aware_exe_manifest") {
+ sources = [
+ as_invoker_manifest,
+ common_controls_manifest,
+ default_compatibility_manifest,
+ dpi_aware_manifest,
+ ]
+ type = "exe"
+}
+
+# Depending on this target gives a default executable manifest with the addition
+# of the DPI aware tag and a requestedExecutionLevel of requireAdministrator.
+windows_manifest("dpi_aware_elevated_exe_manifest") {
+ sources = [
+ common_controls_manifest,
+ default_compatibility_manifest,
+ dpi_aware_manifest,
+ require_administrator_manifest,
+ ]
+ type = "exe"
+}
+
+# GYP version: remoting/remoting_host:remoting_host_credits
+action("credits") {
+ # We put this in $root_build_dir/gen/remoting instead of
+ # $root_build_dir/gen/remoting/host (target_gen_dir) for
+ # compatibility w/ GYP, since the installer needs the file to
+ # be at the same location.
+ about_credits_file = "$root_build_dir/gen/remoting/CREDITS.txt"
+ script = "//tools/licenses.py"
+
+ inputs = [
+ "installer/credits.tmpl",
+ "installer/credits_entry.tmpl",
+ ]
+
+ outputs = [
+ about_credits_file,
+ ]
+
+ args = [
+ "credits",
+ rebase_path(about_credits_file, root_build_dir),
+ "--file-template",
+ rebase_path("installer/credits.tmpl", root_build_dir),
+ "--entry-template",
+ rebase_path("installer/credits_entry.tmpl", root_build_dir),
+ ]
+}
+
+# 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("host") {
+ sources = rebase_path(remoting_host_srcs_gypi_values.remoting_host_sources,
+ ".",
+ "//remoting")
+
+ libs = []
+
+ configs += [
+ "//build/config/compiler:wexit_time_destructors",
+ "//remoting:version",
+ ]
+
+ defines = [ "WEBRTC_CHROMIUM_BUILD" ]
+
+ deps = [
+ "//base:i18n",
+ "//components/policy:policy_component_common",
+ "//crypto",
+ "//google_apis",
+ "//ipc",
+ "//remoting/base",
+ "//remoting/protocol",
+ "//remoting/resources",
+ "//ui/base",
+ "//ui/events:dom_keycode_converter",
+ "//ui/events/platform",
+ ]
+
+ if (enable_configuration_policy) {
+ deps += [ "//components/policy:policy" ]
+ }
+
+ if (is_linux && !is_chromeos) {
+ libs += [ "pam" ]
+ }
+
+ if (use_x11) {
+ configs += [
+ "//build/config/linux:x11",
+ "//build/config/linux:xrandr",
+ ]
+ if (is_desktop_linux) {
+ deps += [ "//build/config/linux/gtk2" ]
+ }
+ } else {
+ sources -= [
+ "clipboard_x11.cc",
+ "desktop_resizer_x11.cc",
+ "input_injector_x11.cc",
+ "local_input_monitor_x11.cc",
+ ]
+ if (is_linux) {
+ # These will already be filtered out on non-Linux.
+ sources -= [
+ "linux/unicode_to_keysym.cc",
+ "linux/x11_util.cc",
+ "linux/x_server_clipboard.cc",
+ "linux/x_server_clipboard.h",
+ ]
+ }
+ }
+
+ if (!use_ozone) {
+ sources -= [ "desktop_resizer_ozone.cc" ]
+ }
+
+ if (is_chromeos) {
+ # TODO(GYP): crbug.com/481627. These should only be included
+ # when enable_me2me_host is true.
+ sources -= [
+ "me2me_desktop_environment.cc",
+ "me2me_desktop_environment.h",
+ ]
+ deps += [
+ "//cc",
+ "//gpu/command_buffer/common",
+ "//ppapi/host",
+ "//skia",
+ "//ui/aura",
+ "//ui/compositor",
+ "//ui/events",
+ "//ui/views",
+ ]
+
+ if (use_ash) {
+ deps += [ "//ash" ]
+ }
+
+ if (use_ozone) {
+ deps += [ "//ui/ozone" ]
+ sources -= [ "desktop_resizer_ozone.cc" ]
+ } else {
+ sources -= [
+ "clipboard_x11.cc",
+ "desktop_resizer_x11.cc",
+ "input_injector_chromeos.cc",
+ "input_injector_chromeos.h",
+ "linux/x_server_clipboard.cc",
+ "linux/x_server_clipboard.h",
+ "local_input_monitor_x11.cc",
+ ]
+ }
+
+ sources -= [
+ "continue_window_linux.cc",
+ "curtain_mode_linux.cc",
+ "disconnect_window_linux.cc",
+ ]
+ }
+
+ if (is_mac) {
+ libs += [
+ "Accelerate.framework",
+ "Carbon.framework",
+ ]
+
+ # TODO(nicholss): When we can delete GYP builds,
+ # this flag and usage can be removed.
+ defines += [ "GN_BUILD=1" ]
+ deps += [
+ ":remoting_version",
+ "//third_party/google_toolbox_for_mac",
+ ]
+ }
+
+ if (is_win) {
+ deps += [
+ ":messages",
+ ":remoting_lib_idl",
+ ]
+ }
+
+ if (enable_webrtc) {
+ deps += [ "//third_party/webrtc/modules/desktop_capture" ]
+ }
+
+ if (is_android) {
+ sources -= [
+ "single_window_desktop_environment.cc",
+ "single_window_desktop_environment.h",
+ ]
+ }
+}
+
+source_set("test_support") {
+ testonly = true
+
+ sources = [
+ "fake_desktop_environment.cc",
+ "fake_desktop_environment.h",
+ "fake_host_extension.cc",
+ "fake_host_extension.h",
+ "fake_host_status_monitor.h",
+ "fake_host_status_monitor.h",
+ "fake_mouse_cursor_monitor.cc",
+ "fake_mouse_cursor_monitor.h",
+ "fake_oauth_token_getter.cc",
+ "fake_oauth_token_getter.h",
+ "host_mock_objects.cc",
+ "host_mock_objects.h",
+ "security_key/fake_ipc_gnubby_auth_handler.cc",
+ "security_key/fake_ipc_gnubby_auth_handler.h",
+ "security_key/fake_remote_security_key_ipc_client.cc",
+ "security_key/fake_remote_security_key_ipc_client.h",
+ "security_key/fake_remote_security_key_ipc_server.cc",
+ "security_key/fake_remote_security_key_ipc_server.h",
+ "security_key/fake_remote_security_key_message_reader.cc",
+ "security_key/fake_remote_security_key_message_reader.h",
+ "security_key/fake_remote_security_key_message_writer.cc",
+ "security_key/fake_remote_security_key_message_writer.h",
+ "setup/mock_oauth_client.cc",
+ "setup/mock_oauth_client.h",
+ ]
+
+ configs += [ "//remoting:version" ]
+
+ deps = [
+ "//remoting/proto",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+ public_deps = [
+ ":host",
+ "//third_party/protobuf:protobuf_lite",
+ ]
+
+ if (enable_webrtc) {
+ public_deps += [
+ "//third_party/libjingle:libjingle_webrtc",
+ "//third_party/webrtc/modules/desktop_capture",
+ ]
+ }
+}
+
+# The host portions of the remoting unit tests.
+source_set("unit_tests") {
+ testonly = true
+
+ sources = [
+ "audio_pump_unittest.cc",
+ "audio_silence_detector_unittest.cc",
+ "backoff_timer_unittest.cc",
+ "chromeos/aura_desktop_capturer_unittest.cc",
+ "chromeos/clipboard_aura_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_process_unittest.cc",
+ "gcd_rest_client_unittest.cc",
+ "gcd_state_updater_unittest.cc",
+ "heartbeat_sender_unittest.cc",
+ "host_change_notification_listener_unittest.cc",
+ "host_config_unittest.cc",
+ "host_extension_session_manager_unittest.cc",
+ "host_status_logger_unittest.cc",
+ "ipc_desktop_environment_unittest.cc",
+ "it2me/it2me_confirmation_dialog_proxy_unittest.cc",
+ "it2me/it2me_native_messaging_host_unittest.cc",
+ "linux/audio_pipe_reader_unittest.cc",
+ "linux/certificate_watcher_unittest.cc",
+ "linux/unicode_to_keysym_unittest.cc",
+ "linux/x_server_clipboard_unittest.cc",
+ "local_input_monitor_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",
+ "pairing_registry_delegate_linux_unittest.cc",
+ "pairing_registry_delegate_win_unittest.cc",
+ "pin_hash_unittest.cc",
+ "policy_watcher_unittest.cc",
+ "register_support_host_request_unittest.cc",
+ "remote_input_filter_unittest.cc",
+ "resizing_host_observer_unittest.cc",
+ "resources_unittest.cc",
+ "screen_resolution_unittest.cc",
+ "security_key/gnubby_auth_handler_linux_unittest.cc",
+ "security_key/gnubby_auth_handler_win_unittest.cc",
+ "security_key/gnubby_extension_session_unittest.cc",
+ "security_key/remote_security_key_ipc_client_unittest.cc",
+ "security_key/remote_security_key_ipc_server_unittest.cc",
+ "security_key/remote_security_key_message_handler_unittest.cc",
+ "security_key/remote_security_key_message_reader_impl_unittest.cc",
+ "security_key/remote_security_key_message_writer_impl_unittest.cc",
+ "server_log_entry_host_unittest.cc",
+ "setup/me2me_native_messaging_host_unittest.cc",
+ "setup/oauth_helper_unittest.cc",
+ "setup/pin_validator_unittest.cc",
+ "third_party_auth_config_unittest.cc",
+ "token_validator_factory_impl_unittest.cc",
+ "touch_injector_win_unittest.cc",
+ "win/rdp_client_unittest.cc",
+ "win/worker_process_launcher_unittest.cc",
+ ]
+
+ if (!use_x11 && is_linux) {
+ sources -= [ "linux/unicode_to_keysym_unittest.cc" ]
+ }
+ if (use_ozone || is_chromeos) {
+ sources -= [ "local_input_monitor_unittest.cc" ]
+ }
+ if (is_chromeos) {
+ sources -= [ "linux/x_server_clipboard_unittest.cc" ]
+ }
+ if (is_android) {
+ sources -= [ "it2me/it2me_native_messaging_host_unittest.cc" ]
+ }
+
+ configs += [ "//remoting:version" ]
+
+ deps = [
+ ":host",
+ ":test_support",
+ "//remoting/host/it2me:common",
+ "//remoting/host/native_messaging",
+ "//remoting/host/setup",
+ "//remoting/proto",
+ "//skia",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+
+ if (enable_configuration_policy) {
+ deps += [ "//components/policy:policy_component_test_support" ]
+ }
+}
+
+if (is_win) {
+ import("//build/toolchain/win/midl.gni")
+ import("//build/win/message_compiler.gni")
+
+ # TODO(brettw) these should not be generated via exec_script. This should be
+ # part of the build process rather than the metabuild. Instead, a script
+ # should generate a header containing the #defines for this as well as the
+ # IDL file with the values.
+ clsids = exec_script("win/get_clsids.py",
+ [
+ remoting_srcs_gypi_values.daemon_controller_guid,
+ remoting_srcs_gypi_values.rdp_desktop_session_guid,
+ chrome_version_full,
+ ],
+ "value")
+ daemon_controller_clsid = clsids[0]
+ rdp_desktop_session_clsid = clsids[1]
+
+ action("generate_idl") {
+ script = "//build/util/version.py"
+
+ inputs = [
+ "win/chromoting_lib_idl.templ",
+ ]
+ outputs = [
+ "$target_gen_dir/chromoting_lib.idl",
+ ]
+
+ args = [
+ "-e",
+ "DAEMON_CONTROLLER_CLSID='$daemon_controller_clsid'",
+ "-e",
+ "RDP_DESKTOP_SESSION_CLSID='$rdp_desktop_session_clsid'",
+ rebase_path(inputs[0], root_build_dir),
+ rebase_path(outputs[0], root_build_dir),
+ ]
+ }
+
+ midl("remoting_lib_idl") {
+ sources = get_target_outputs(":generate_idl")
+ deps = [
+ ":generate_idl",
+ ]
+ }
+
+ config("MIDL_config") {
+ if (is_clang) {
+ cflags = [
+ # MIDL generated code has a habit of omitting optional braces.
+ "-Wno-missing-braces",
+
+ # Source files generated by the MIDL compiler trigger warnings with
+ # -Wincompatible-pointer-types enabled.
+ "-Wno-incompatible-pointer-types",
+
+ # Generated code contains unused variables.
+ "-Wno-unused-variable",
+
+ # PROXYFILE_LIST_START is an extern with initializer.
+ "-Wno-extern-initializer",
+ ]
+ }
+ }
+
+ # GYP version: remoting/remoting_host_win.gypi:remoting_lib_ps
+ static_library("remoting_lib_ps") {
+ configs += [ ":MIDL_config" ]
+
+ defines = [
+ "ENTRY_PREFIX=Ps",
+ "REGISTER_PROXY_DLL",
+ ]
+
+ deps = [
+ ":remoting_lib_idl",
+ ]
+
+ sources = [
+ "$root_gen_dir/remoting/host/chromoting_lib.dlldata.c",
+ "$root_gen_dir/remoting/host/chromoting_lib_p.c",
+ ]
+ }
+
+ # Makes the .mc file from the .mc.jinja file.
+ remoting_localize("messages_localizing") {
+ sources = [
+ "win/host_messages.mc.jinja2",
+ ]
+ locales = remoting_locales
+ locale_dir = webapp_locale_dir
+ encoding = "utf-16"
+
+ # This target is funny. It only produces one file and the output doesn't
+ # match the input. We want to generate remoting_host_messages.mc from
+ # host_messages.mg.jinja2. GN complains if it doesn't see a pattern in the
+ # output, so the following pattern produces the name we want with a template
+ # based on the input.
+ #
+ # TODO: This is for GYP compat. We should just make the names match instead.
+ output = "$target_gen_dir/remoting_{{source_name_part}}"
+ }
+
+ # Makes the .h/.rc files from the .mc file.
+ message_compiler("messages") {
+ compile_generated_code = false
+ sources = get_target_outputs(":messages_localizing")
+ deps = [
+ ":messages_localizing",
+ ]
+ }
+
+ # GYP version: remoting/remoting_host_win.gypi:remoting_console
+ executable("remoting_console") {
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+
+ defines = host_predefines + [ "BINARY=BINARY_HOST_ME2ME" ]
+
+ deps = [
+ ":dpi_aware_exe_manifest",
+ ":remoting_core",
+ ":remoting_windows_resources",
+ ]
+
+ sources = [
+ "$root_gen_dir/remoting/version.rc",
+ "win/entry_point.cc",
+ ]
+
+ ldflags = [
+ "/ENTRY:HostEntryPoint",
+ # "/NODEFAULTLIB",
+ ]
+ }
+
+ # GYP version: //remoting/remoting_host_win.gypi:remoting_core
+ shared_library("remoting_core") {
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+
+ defines = host_predefines + [
+ "_ATL_APARTMENT_THREADED",
+ "_ATL_CSTRING_EXPLICIT_CONSTRUCTORS",
+ "_ATL_NO_AUTOMATIC_NAMESPACE",
+ "_ATL_NO_EXCEPTIONS",
+ "BINARY=BINARY_CORE",
+ "DAEMON_CONTROLLER_CLSID=\"$daemon_controller_clsid\"",
+ "RDP_DESKTOP_SESSION_CLSID=\"$rdp_desktop_session_clsid\"",
+ "HOST_IMPLEMENTATION",
+ "ISOLATION_AWARE_ENABLED=1",
+ "STRICT",
+ "VERSION=$chrome_version_full",
+ ]
+
+ if (remoting_multi_process != 0 && remoting_rdp_session != 0) {
+ defines += [ "REMOTING_RDP_SESSION" ]
+ }
+
+ if (remoting_multi_process != 0) {
+ defines += [ "REMOTING_MULTI_PROCESS" ]
+ }
+
+ deps = [
+ ":host",
+ ":messages",
+ ":remoting_lib_idl",
+ ":remoting_lib_ps",
+ ":remoting_me2me_host_static",
+ ":remoting_windows_resources",
+ "//base",
+ "//base:base_static",
+ "//base/allocator",
+ "//base/third_party/dynamic_annotations",
+ "//build/win:default_exe_manifest",
+ "//ipc",
+ "//net",
+ "//remoting/base",
+ "//remoting/base:breakpad",
+ "//remoting/codec",
+ "//remoting/host/it2me:common",
+ "//remoting/host/native_messaging",
+ "//remoting/host/setup",
+ "//remoting/protocol",
+ "//sandbox/win:sandbox", # Should always use Windows version
+ "//third_party/webrtc/modules/desktop_capture",
+ ]
+
+ sources = [
+ "$root_gen_dir/remoting/core.rc",
+ "$root_gen_dir/remoting/host/remoting_host_messages.rc",
+ "$root_gen_dir/remoting/version.rc",
+ "desktop_process_main.cc",
+ "host_main.cc",
+ "host_main.h",
+ "it2me/it2me_native_messaging_host_main.cc",
+ "it2me/it2me_native_messaging_host_main.h",
+ "security_key/remote_security_key_main.cc",
+ "security_key/remote_security_key_main.h",
+ "setup/host_starter.cc",
+ "setup/host_starter.h",
+ "setup/me2me_native_messaging_host_main.cc",
+ "setup/me2me_native_messaging_host_main.h",
+ "setup/start_host_main.cc",
+ "setup/start_host_main.h",
+ "win/chromoting_lib.rc",
+ "win/chromoting_module.cc",
+ "win/chromoting_module.h",
+ "win/core.cc",
+ "win/core_resource.h",
+ "win/host_service.cc",
+ "win/host_service.h",
+ "win/omaha.cc",
+ "win/omaha.h",
+ "win/rdp_desktop_session.cc",
+ "win/rdp_desktop_session.h",
+ "win/unprivileged_process_delegate.cc",
+ "win/unprivileged_process_delegate.h",
+ "win/wts_session_process_delegate.cc",
+ "win/wts_session_process_delegate.h",
+ "worker_process_ipc_delegate.h",
+ ]
+
+ ldflags = [
+ "/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE",
+ "/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE",
+ "/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE",
+ "/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE",
+ ]
+
+ libs = [
+ "comctl32.lib",
+ "rpcns4.lib",
+ "rpcrt4.lib",
+ "sas.lib",
+ "uuid.lib",
+ "wtsapi32.lib",
+ ]
+
+ if (is_clang) {
+ cflags = [ "-Wno-header-hygiene" ]
+ }
+ }
+
+ # GYP version: //remoting/remoting_host_win.gypi:remoting_desktop
+ executable("remoting_desktop") {
+ configs += [
+ "//build/config/compiler:wexit_time_destructors",
+ "//build/config/win:windowed",
+ ]
+
+ defines = host_predefines + [ "BINARY=BINARY_DESKTOP" ]
+
+ deps = [
+ ":remoting_core",
+ ":remoting_windows_resources",
+ ]
+
+ if (is_official_build) {
+ deps += [ ":dpi_aware_elevated_exe_manifest" ]
+ } else {
+ deps += [ ":dpi_aware_exe_manifest" ]
+ }
+
+ sources = [
+ "$root_gen_dir/remoting/version.rc",
+ "win/entry_point.cc",
+ ]
+
+ ldflags = [
+ "/ENTRY:HostEntryPoint",
+ # "/NODEFAULTLIB",
+ ]
+ }
+
+ # GYP version: //remoting/remoting_host_win.gypi:remote_security_key
+ executable("remote_security_key") {
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+
+ defines = host_predefines + [ "BINARY=BINARY_REMOTE_SECURITY_KEY" ]
+
+ deps = [
+ ":remoting_core",
+ ":remoting_windows_resources",
+ "//build/win:default_exe_manifest",
+ ]
+
+ sources = [
+ "$root_gen_dir/remoting/version.rc",
+ "security_key/remote_security_key_entry_point.cc",
+ ]
+ }
+
+ # GYP version:
+ # //remoting/remoting_host_win.gypi:remoting_me2me_native_messaging_host
+ executable("remoting_native_messaging_host") {
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+
+ defines = host_predefines + [ "BINARY=BINARY_NATIVE_MESSAGING_HOST" ]
+
+ deps = [
+ ":remoting_core",
+ ":remoting_windows_resources",
+ "//build/win:default_exe_manifest",
+ ]
+
+ if (is_mac) {
+ foreach(locale, remoting_locales_with_underscores) {
+ deps += [
+ ":native_messaging_host_strings_${locale}_bundle_data",
+ ":remoting_host_locale_${locale}_bundle_data",
+ ]
+ }
+ deps += [
+ ":remoting_infoplist_strings",
+ "//remoting/resources:copy_locales",
+ ]
+ }
+
+ sources = [
+ "$root_gen_dir/remoting/version.rc",
+ "setup/me2me_native_messaging_host_entry_point.cc",
+ ]
+ }
+
+ # GYP version: //remoting/remoting_host_win.gypi:remoting_windows_resources
+ remoting_localize("remoting_windows_resources") {
+ deps = [
+ "//remoting/resources",
+ ]
+
+ sources = [
+ "win/core.rc.jinja2",
+ "win/version.rc.jinja2",
+ ]
+
+ # TODO(zijiehe): Export lastchange_path from
+ # //chrome/version.gni:process_version
+ variables = [
+ rebase_path(chrome_version_file),
+ rebase_path(remoting_version_file),
+ rebase_path("//build/util/LASTCHANGE"),
+ ]
+
+ output = "$root_gen_dir/remoting/{{source_name_part}}"
+
+ locale_dir = webapp_locale_dir
+
+ encoding = "utf-16"
+
+ locales = remoting_locales
+ }
+
+ # TODO(GYP) More Windows remoting targets from remoting_host_win.gypi
+}
+
+if (enable_remoting_host && !is_android) {
+ executable("remoting_start_host") {
+ sources = [
+ "setup/start_host_entry_point.cc",
+ ]
+
+ deps = [
+ "//build/config/sanitizers:deps",
+ ]
+
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+
+ if (is_win) {
+ defines = host_predefines + [ "BINARY=BINARY_REMOTING_START_HOST" ]
+
+ deps += [
+ ":remoting_core",
+ ":remoting_windows_resources",
+ "//build/win:default_exe_manifest",
+ ]
+ } else {
+ sources += [
+ "setup/host_starter.cc",
+ "setup/host_starter.h",
+ "setup/start_host_main.cc",
+ "setup/start_host_main.h",
+ ]
+
+ deps += [ "//remoting/host/setup" ]
+ }
+
+ if (enable_webrtc) {
+ deps += [ "//third_party/libjingle:libjingle_webrtc" ]
+ }
+ }
+
+ 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"
+ } else if (is_win) {
+ me2me_host_path = "remoting_native_messaging_host.exe"
+ it2me_host_path = "remote_assistance_host.exe"
+ } else {
+ me2me_host_path =
+ "/opt/google/chrome-remote-desktop/native-messaging-host"
+ it2me_host_path =
+ "/opt/google/chrome-remote-desktop/remote-assistance-host"
+ }
+
+ script = "../tools/build/remoting_localize.py"
+
+ sources = [
+ "it2me/com.google.chrome.remote_assistance.json.jinja2",
+ "setup/com.google.chrome.remote_desktop.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",
+ "--variables",
+ rebase_path(branding_path),
+ "--template",
+ "{{source}}",
+ "--output",
+ "remoting/{{source_name_part}}",
+ "en",
+ ]
+ }
+
+ if (is_mac) {
+ foreach(locale, remoting_locales_with_underscores) {
+ bundle_data("remoting_host_locale_${locale}_bundle_data") {
+ sources = [
+ "$root_build_dir/remoting/resources/$locale.lproj/locale.pak",
+ ]
+ outputs = [
+ "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
+ ]
+ deps = [
+ "//remoting/resources:copy_locales",
+ ]
+ }
+ }
+ }
+
+ action_foreach("remoting_infoplist_strings") {
+ sources = [
+ "installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2",
+ "it2me/remote_assistance_host-InfoPlist.strings.jinja2",
+ "mac/me2me_preference_pane-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(webapp_locale_dir, root_build_dir),
+ "--variables",
+ rebase_path(branding_path),
+ "--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) {
+ source_set("remoting_me2me_host_static") {
+ sources = [
+ "pam_authorization_factory_posix.cc",
+ "pam_authorization_factory_posix.h",
+ "remoting_me2me_host.cc",
+ ]
+ defines = []
+
+ configs += [ "//remoting:version" ]
+
+ deps = [
+ "//base",
+ "//base:i18n",
+ "//components/policy:policy_component_common",
+ "//net",
+ "//remoting/base",
+ "//remoting/host",
+ "//remoting/proto",
+ "//third_party/webrtc/modules/desktop_capture",
+ ]
+
+ if (enable_configuration_policy) {
+ deps += [ "//components/policy" ]
+ }
+
+ if (enable_webrtc) {
+ deps += [ "//third_party/libjingle:libjingle_webrtc" ]
+ }
+
+ if (is_desktop_linux) {
+ deps += [ "//build/config/linux/gtk2" ]
+ }
+ if ((is_linux && !is_chromeos) || is_mac) {
+ libs = [ "pam" ]
+ }
+
+ if (is_mac && is_official_build) {
+ sources += [ "internal/internal_mac-inl.h" ]
+ defines += [ "USE_REMOTING_MACOSX_INTERNAL" ]
+ }
+
+ if (is_win && remoting_multi_process != 0 && remoting_rdp_session != 0) {
+ defines += [ "REMOTING_RDP_SESSION" ]
+ }
+
+ if (remoting_multi_process != 0) {
+ defines += [ "REMOTING_MULTI_PROCESS" ]
+ }
+ }
+
+ if (is_win) {
+ # GYP version: //remoting/remoting_host_win.gypi:remoting_me2me_host
+ executable("remoting_me2me_host") {
+ configs += [
+ "//build/config/compiler:wexit_time_destructors",
+ "//build/config/win:windowed",
+ ]
+
+ defines = host_predefines + [ "BINARY=BINARY_HOST_ME2ME" ]
+
+ deps = [
+ ":dpi_aware_exe_manifest",
+ ":remoting_core",
+ ":remoting_windows_resources",
+ ]
+
+ sources = [
+ "$root_gen_dir/remoting/version.rc",
+ "win/entry_point.cc",
+ ]
+
+ output_name = "remoting_host"
+
+ ldflags = [
+ "/ENTRY:HostEntryPoint",
+ # "/NODEFAULTLIB",
+ ]
+ }
+ } else {
+ if (is_mac) {
+ app_target_type = "mac_app_bundle"
+ } else {
+ app_target_type = "executable"
+ }
+
+ if (is_mac) {
+ # remoting_me2me_host-InfoPlist.strings
+ foreach(locale, remoting_locales_with_underscores) {
+ bundle_data("remoting_me2me_host_strings_${locale}_bundle_data") {
+ sources = [
+ "$root_gen_dir/remoting/host/remoting_me2me_host-InfoPlist.strings/$locale.lproj/InfoPlist.strings",
+ ]
+ outputs = [
+ "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
+ ]
+ deps = [
+ ":remoting_infoplist_strings",
+ ]
+ }
+ }
+ }
+
+ target(app_target_type, "remoting_me2me_host") {
+ if (is_mac) {
+ extra_configs = [ "//remoting:version" ]
+ info_plist = "remoting_me2me_host-Info.plist"
+ } else {
+ configs += [ "//remoting:version" ]
+ }
+
+ sources = [
+ "host_main.cc",
+ "host_main.h",
+ ]
+
+ if (is_mac && is_chrome_branded && is_official_build) {
+ defines = [ "REMOTING_ENABLE_BREAKPAD" ]
+ }
+
+ deps = [
+ ":credits",
+ ":remoting_me2me_host_static",
+ "//build/config/sanitizers:deps",
+ "//remoting/resources",
+ ]
+ if (is_mac) {
+ foreach(locale, remoting_locales_with_underscores) {
+ deps += [
+ ":remoting_host_locale_${locale}_bundle_data",
+ ":remoting_me2me_host_strings_${locale}_bundle_data",
+ ]
+ }
+ deps += [
+ ":remoting_infoplist_strings",
+ "//remoting/resources:copy_locales",
+ ]
+ }
+ }
+
+ if (is_linux) {
+ copy("remoting_me2me_host_copy_script") {
+ sources = [
+ "linux/linux_me2me_host.py",
+ ]
+ outputs = [
+ "$root_build_dir/remoting/chrome-remote-desktop",
+ ]
+ }
+ copy("remoting_me2me_host_copy_host") {
+ sources = [
+ "linux/remoting_me2me_host_wrapper.sh",
+ ]
+ outputs = [
+ "$root_build_dir/remoting/chrome-remote-desktop-host",
+ ]
+ deps = [
+ ":remoting_me2me_host",
+ ]
+ }
+ group("remoting_dev_me2me_host") {
+ deps = [
+ ":remoting_me2me_host",
+ ":remoting_me2me_host_copy_host",
+ ":remoting_me2me_host_copy_script",
+ ]
+ }
+ }
+
+ if (is_mac) {
+ # native_messaging_host-InfoPlist.strings
+ foreach(locale, remoting_locales_with_underscores) {
+ bundle_data("native_messaging_host_strings_${locale}_bundle_data") {
+ sources = [
+ "$root_gen_dir/remoting/host/native_messaging_host-InfoPlist.strings/$locale.lproj/InfoPlist.strings",
+ ]
+ outputs = [
+ "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
+ ]
+ deps = [
+ ":remoting_infoplist_strings",
+ ]
+ }
+ }
+ }
+
+ target(app_target_type, "native_messaging_host") {
+ if (is_mac) {
+ info_plist = "setup/native_messaging_host-Info.plist"
+ extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
+ } else {
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+ }
+
+ sources = [
+ "setup/me2me_native_messaging_host_entry_point.cc",
+ "setup/me2me_native_messaging_host_main.cc",
+ "setup/me2me_native_messaging_host_main.h",
+ ]
+
+ deps = [
+ ":remoting_infoplist_strings",
+ "//base",
+ "//remoting/base:breakpad",
+ "//remoting/host",
+ "//remoting/host/native_messaging",
+ "//remoting/host/setup",
+ ]
+
+ if (is_mac) {
+ foreach(locale, remoting_locales_with_underscores) {
+ deps += [
+ ":native_messaging_host_strings_${locale}_bundle_data",
+ ":remoting_host_locale_${locale}_bundle_data",
+ ]
+ }
+ deps += [ "//remoting/resources:copy_locales" ]
+ }
+
+ # The |major|, |build| and |patch| versions are inherited from Chrome.
+ # Since Chrome's |minor| version is always '0', we replace it with a
+ # Chromoting-specific patch version.
+ defines = [ "VERSION=" + "$chrome_version_major" + "." +
+ "$remoting_version_patch" + "." + "$chrome_version_build" +
+ "." + "$chrome_version_patch" ]
+ }
+ }
+
+ if (is_chrome_branded && enable_me2me_host && is_linux && !is_chromeos) {
+ # TODO(GYP): add support for archive_chromoting_tests variable?
+
+ import("//build/config/zip.gni")
+
+ build_deb_script = "installer/linux/build_deb.py"
+ deb_filename =
+ "$root_build_dir/" + exec_script(build_deb_script,
+ [
+ "-p",
+ "-s",
+ rebase_path("//"),
+ ],
+ "string",
+ [ "installer/linux/build-deb.sh" ])
+ changes_filename =
+ "$root_build_dir/" + get_path_info(deb_filename, "name") + ".changes"
+
+ packaging_outputs = [
+ deb_filename,
+ changes_filename,
+
+ # TODO(GYP): Check that these are generated by build_deb.py.
+ #"$root_build_dir/remoting_me2me_host.debug",
+ #"$root_build_dir/remoting_start_host.debug",
+ #"$root_build_dir/native_messaging_host.debug",
+ #"$root_build_dir/remote_assistance_host.debug",
+ ]
+
+ zip("remoting_me2me_host_archive") {
+ # Store the installer package(s) into a zip file so there is a
+ # consistent filename to reference for build archiving (i.e. in
+ # FILES.cfg). This also avoids possible conflicts with "wildcard"
+ # package handling in other build/signing scripts.
+ inputs = packaging_outputs
+ output = "$root_build_dir/remoting-me2me-host-linux.zip"
+ deps = [
+ ":remoting_me2me_host_copy",
+ ]
+ }
+
+ copy("remoting_me2me_host_copy") {
+ # Copy the debian package file, which has version info in it,
+ # to a consistewnt filename for use on Chromoting swarming bots.
+ sources = [
+ deb_filename,
+ ]
+ outputs = [
+ "$root_build_dir/remoting-me2me-host.deb",
+ ]
+ public_deps = [
+ ":remoting_me2me_host_deb_installer",
+ ]
+ }
+
+ action("remoting_me2me_host_deb_installer") {
+ script = build_deb_script
+ inputs = [
+ build_deb_script,
+ "installer/linux/Makefile",
+ "installer/linux/debian/chrome-remote-desktop.init",
+ "installer/linux/debian/chrome-remote-desktop.pam",
+ "installer/linux/debian/compat",
+ "installer/linux/debian/control",
+ "installer/linux/debian/copyright",
+ "installer/linux/debian/postinst",
+ "installer/linux/debian/preinst",
+ "installer/linux/debian/rules",
+ ]
+ outputs = packaging_outputs
+ sources = [
+ "installer/linux/build-deb.sh",
+ ]
+ args = [
+ "-s",
+ rebase_path("//"),
+ "-o",
+ rebase_path("$root_build_dir"),
+ ]
+
+ deps = [
+ ":native_messaging_host",
+ ":remoting_me2me_host",
+ ":remoting_native_messaging_manifests",
+ ":remoting_start_host",
+ "//remoting/host/it2me:remote_assistance_host",
+ "//remoting/resources",
+ "//third_party/icu:icudata",
+ ]
+ }
+ } else if (is_win) {
+ # GYP version: //remoting/remoting_host_win.gypi:remoting_me2me_host_archive
+ action("remoting_me2me_host_archive") {
+ script = "//remoting/host/installer/build-installer-archive.py"
+
+ deps = [
+ ":credits",
+ ":remote_security_key",
+ ":remoting_core",
+ ":remoting_desktop",
+ ":remoting_me2me_host",
+ ":remoting_native_messaging_host",
+ ":remoting_native_messaging_manifests",
+ ":remoting_start_host",
+ "it2me:remote_assistance_host",
+ "//third_party/icu:icudata",
+ ]
+
+ _output = "$root_out_dir/remoting-me2me-host-$target_os.zip"
+
+ outputs = [
+ _output,
+ ]
+ if (is_chrome_branded) {
+ _branding = "Chrome"
+ } else {
+ _branding = "Chromium"
+ }
+
+ if (is_official_build) {
+ _official_build = "1"
+ } else {
+ _official_build = "0"
+ }
+
+ _generated_files = rebase_path(
+ [
+ "$root_out_dir/remote_assistance_host.exe",
+ "$root_out_dir/remote_security_key.exe",
+ "$root_out_dir/remoting_core.dll",
+ "$root_out_dir/remoting_desktop.exe",
+ "$root_out_dir/remoting_host.exe",
+ "$root_out_dir/remoting_native_messaging_host.exe",
+ "$root_out_dir/remoting_start_host.exe",
+ "$root_gen_dir/remoting/CREDITS.txt",
+ "$root_out_dir/remoting/com.google.chrome.remote_assistance.json",
+ "$root_out_dir/remoting/com.google.chrome.remote_desktop.json",
+ "$root_out_dir/icudtl.dat",
+ ],
+ root_build_dir)
+ _extra_files = []
+
+ args = [
+ rebase_path("$root_gen_dir/installation", root_build_dir),
+ rebase_path(_output, root_build_dir),
+ "--source-file-roots",
+ rebase_path("//remoting/host/installer/win"),
+ "--source-files",
+ rebase_path("//remoting/host/installer/win/chromoting.wxs"),
+ rebase_path("//remoting/host/installer/win/parameters.json"),
+
+ # Input files
+ "--generated-files",
+ ] + _generated_files +
+ [
+ rebase_path("//remoting/resources/chromoting.ico"),
+
+ # Position of files in zip file
+ "--generated-files-dst",
+ "files/remote_assistance_host.exe",
+ "files/remote_security_key.exe",
+ "files/remoting_core.dll",
+ "files/remoting_desktop.exe",
+ "files/remoting_host.exe",
+ "files/remoting_native_messaging_host.exe",
+ "files/remoting_start_host.exe",
+ "files/CREDITS.txt",
+ "files/com.google.chrome.remote_assistance.json",
+ "files/com.google.chrome.remote_desktop.json",
+ "files/chromoting.ico",
+ "files/icudtl.dat",
+ ] + _extra_files + # Defs
+ [
+ "--defs",
+ "BRANDING=$_branding",
+ "DAEMON_CONTROLLER_CLSID={$daemon_controller_clsid}",
+ "RDP_DESKTOP_SESSION_CLSID={$rdp_desktop_session_clsid}",
+ "VERSION=$chrome_version_full",
+ "OFFICIAL_BUILD=$_official_build",
+ ]
+ }
+ } else if (is_mac) {
+ import("//build/config/zip.gni")
+
+ action("remoting_me2me_host_archive") {
+ # TODO(GYP) TODO(crbug.com/622415) This needs work and testing.
+
+ # TODO(GYP) At the very least, we need to add in the localized strings.
+
+ _installer_mac_files = [
+ "installer/mac/do_signing.sh",
+ "installer/mac/do_signing.props",
+ "installer/mac/ChromotingHost.pkgproj",
+ "installer/mac/ChromotingHostService.pkgproj",
+ "installer/mac/ChromotingHostUninstaller.pkgproj",
+ "installer/mac/LaunchAgents/org.chromium.chromoting.plist",
+ "installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh",
+ "installer/mac/Scripts/keystone_install.sh",
+ "installer/mac/Scripts/remoting_postflight.sh",
+ "installer/mac/Scripts/remoting_preflight.sh",
+ "installer/mac/Keystone/GoogleSoftwareUpdate.pkg",
+ "//chrome/installer/mac/pkg-dmg",
+ ]
+
+ inputs = _installer_mac_files
+
+ zip_path = "$root_build_dir/remoting-me2me-host-mac.zip"
+
+ outputs = [
+ "$root_build_dir/remoting-me2me-host-mac.zip",
+ ]
+
+ script = "installer/build-installer-archive.py"
+
+ # TODO(GYP) TODO(crbug.com/622415): Fill these in.
+ host_name_nospace = host_name
+ host_service_name_nospace = host_service_name
+ host_uninstaller_name_nospace = host_uninstaller_name
+
+ args = [
+ rebase_path(target_gen_dir, root_build_dir),
+ rebase_path(zip_path, root_build_dir),
+ "--source-file-roots",
+ rebase_path("installer/mac/", root_build_dir),
+ rebase_path("//chrome/installer/mac", root_build_dir),
+ "--source-files",
+ ] + rebase_path(_installer_mac_files, root_build_dir) + [
+ "--generated-files",
+ "remoting_host_prefpane.prefPane",
+ "remoting_me2me_host.app",
+ "native_messaging_host.app",
+ "remote_assistance_host.app",
+ "remoting_host_uninstaller.app",
+ "remoting/com.google.chrome.remote_desktop.json",
+ "remoting/com.google.chrome.remote_assistance.json",
+ "--generated-files-dst",
+ "PreferencePanes/$prefpane_bundle_name",
+ "PrivilegedHelperTools/$host_bundle_name",
+ "PrivilegedHelperTools/$host_bundle_name/Contents/MacOS/$native_messaging_host_bundle_name",
+ "PrivilegedHelperTools/$host_bundle_name/Contents/MacOS/$remote_assistance_host_bundle_name",
+ "Applications/$host_uninstaller_name.app",
+ "Config/com.google.chrome.remote_desktop.json",
+ "Config/com.google.chrome.remote_assistance.json",
+ "--defs",
+ "VERSION=$chrome_version_full",
+ "VERSION_SHORT=$chrome_version_major.$chrome_version_minor.$chrome_version_build",
+ "VERSION_MAJOR=$chrome_version_major",
+ "VERSION_MINOR=$chrome_version_minor",
+ "HOST_NAME=$host_name",
+ "HOST_BUNDLE_NAME=$me2me_host_bundle_name",
+ "HOST_SERVICE_NAME=$host_service_name",
+ "HOST_UNINSTALLER_NAME=$host_uninstaller_name",
+ "HOST_PKG=$host_name",
+ "HOST_SERVICE_PKG=$host_service_name_nospace",
+ "HOST_UNINSTALLER_PKG=$host_uninstaller_name_nospace",
+ "BUNDLE_ID_HOST=$bundle_prefix.$host_name_nospace",
+ "BUNDLE_ID_HOST_SERVICE=$bundle_prefix.$host_service_name_nospace",
+ "BUNDLE_ID_HOST_UNINSTALLER=$bundle_prefix.$host_uninstaller_name_nospace",
+ "DMG_VOLUME_NAME=$host_name $chrome_version_full",
+ "DMG_FILE_NAME=$host_name_nospace-$chrome_version_full",
+ "NATIVE_MESSAGING_HOST_BUNDLE_NAME=$native_messaging_host_bundle_name",
+ "REMOTE_ASSISTANCE_HOST_BUNDLE_NAME=$remote_assistance_host_bundle_name",
+ "PREFPANE_BUNDLE_NAME=$prefpane_bundle_name",
+ ]
+
+ deps = [
+ ":native_messaging_host",
+ ":remoting_host_prefpane.prefPane",
+ ":remoting_host_uninstaller",
+ ":remoting_me2me_host",
+ ":remoting_native_messaging_manifests",
+ "//remoting/host/it2me:remote_assistance_host",
+ ]
+ }
+
+ _uninstaller_plist =
+ "installer/mac/uninstaller/remoting_uninstaller-Info.plist"
+
+ # remoting_uninstaller-InfoPlist.strings
+ foreach(locale, remoting_locales_with_underscores) {
+ bundle_data("remoting_uninstaller_strings_${locale}_bundle_data") {
+ sources = [
+ "$root_gen_dir/remoting/host/remoting_uninstaller-InfoPlist.strings/$locale.lproj/InfoPlist.strings",
+ ]
+ outputs = [
+ "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
+ ]
+ deps = [
+ ":remoting_infoplist_strings",
+ ]
+ }
+ }
+
+ mac_app_bundle("remoting_host_uninstaller") {
+ info_plist = _uninstaller_plist
+
+ defines = [
+ "HOST_BUNDLE_NAME=\"" + host_bundle_name + "\"",
+ "PREFPANE_BUNDLE_NAME=\"" + prefpane_bundle_name + "\"",
+ ]
+
+ sources = [
+ "constants_mac.cc",
+ "constants_mac.h",
+ "installer/mac/uninstaller/remoting_uninstaller.h",
+ "installer/mac/uninstaller/remoting_uninstaller.mm",
+ "installer/mac/uninstaller/remoting_uninstaller_app.h",
+ "installer/mac/uninstaller/remoting_uninstaller_app.mm",
+ ]
+
+ libs = [
+ "Cocoa.framework",
+ "CoreFoundation.framework",
+ "Security.framework",
+ ]
+
+ deps = [
+ ":remoting_host_uninstaller_xibs",
+ ":remoting_infoplist_strings",
+ "//base",
+ ]
+ foreach(locale, remoting_locales_with_underscores) {
+ deps += [ ":remoting_uninstaller_strings_${locale}_bundle_data" ]
+ }
+ }
+
+ mac_xib_bundle_data("remoting_host_uninstaller_xibs") {
+ sources = [
+ #"installer/mac/uninstaller/remoting_uninstaller.icns",
+ "installer/mac/uninstaller/remoting_uninstaller.xib",
+ #_uninstaller_plist
+ ]
+ }
+
+ create_bundle("remoting_host_prefpane.prefPane") {
+ bundle_root_dir = "$root_build_dir/$target_name/Contents"
+ bundle_resources_dir = bundle_root_dir + "/Resources"
+ bundle_executable_dir = bundle_root_dir + "/MacOS"
+
+ deps = [
+ ":remoting_host_prefpane",
+ ":remoting_host_prefpane_bundle_data",
+ ":remoting_host_prefpane_plist",
+ ":remoting_host_prefpane_xibs",
+ ":remoting_infoplist_strings",
+ ]
+
+ foreach(locale, remoting_locales_with_underscores) {
+ deps += [ ":remoting_host_prefpane_strings_${locale}_bundle_data" ]
+ }
+ }
+
+ bundle_data("remoting_host_prefpane_bundle_data") {
+ deps = [
+ ":remoting_host_prefpane",
+ ]
+ sources = [
+ "$root_build_dir/gen/remoting/host/remoting_host_prefpane",
+ ]
+ outputs = [
+ "{{bundle_executable_dir}}/remoting_host_prefname",
+ ]
+ }
+
+ loadable_module("remoting_host_prefpane") {
+ output_dir = "$root_out_dir/gen/remoting/host"
+ output_extension = ""
+
+ sources = [
+ "mac/me2me_preference_pane.h",
+ "mac/me2me_preference_pane.mm",
+ "mac/me2me_preference_pane_confirm_pin.h",
+ "mac/me2me_preference_pane_confirm_pin.mm",
+ "mac/me2me_preference_pane_disable.h",
+ "mac/me2me_preference_pane_disable.mm",
+ ]
+
+ libs = [
+ "Cocoa.framework",
+ "CoreFoundation.framework",
+ "PreferencePanes.framework",
+ "Security.framework",
+ ]
+
+ deps = [
+ ":host",
+ ":remoting_host_prefpane_xibs",
+ ":remoting_infoplist_strings",
+ "//remoting/base",
+ "//remoting/resources:copy_locales",
+ "//third_party/jsoncpp",
+ ]
+ foreach(locale, remoting_locales_with_underscores) {
+ deps += [ ":remoting_host_prefpane_strings_${locale}_bundle_data" ]
+ }
+ }
+
+ bundle_data("remoting_host_prefpane_plist") {
+ sources = [
+ "mac/me2me_preference_pane-Info.plist",
+ ]
+ outputs = [
+ "{{bundle_root_dir}}/Info.plist",
+ ]
+ }
+
+ foreach(locale, remoting_locales_with_underscores) {
+ bundle_data("remoting_host_prefpane_strings_${locale}_bundle_data") {
+ sources = [
+ "$root_gen_dir/remoting/host/me2me_preference_pane-InfoPlist.strings/$locale.lproj/InfoPlist.strings",
+ ]
+ outputs = [
+ "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
+ ]
+ deps = [
+ ":remoting_infoplist_strings",
+ ]
+ }
+ }
+
+ mac_xib_bundle_data("remoting_host_prefpane_xibs") {
+ sources = [
+ "mac/me2me_preference_pane.xib",
+ #"mac/me2me_preference_pane_confirm_pin.xib",
+ #"mac/me2me_preference_pane_disable.xib",
+ #"mac/me2me_preference_pane-Info.plist",
+ #"//remoting/resources/chromoting128.png",
+ ]
+ }
+ } else {
+ group("remoting_me2me_host_archive") {
+ }
+ }
+
+ if (is_win && is_chrome_branded) {
+ # We do not release a 64 bits binary. So to avoid any potential
+ # misunderstanding, we only build 32 bits MSI file.
+ if (target_cpu == "x86") {
+ # The script uses "ia32" instead of "x86".
+ msi_script_arch = "ia32"
+
+ # GYP version: remoting/remoting_host_win.gyp:remoting_host_installation
+ action("remoting_host_installation") {
+ deps = [
+ "//remoting/host:remoting_me2me_host_archive",
+ ]
+ script = "../tools/zip2msi.py"
+ outputs = [
+ "$root_out_dir/chromoting.msi",
+ ]
+ args = [
+ "--wix_path",
+ rebase_path("//third_party/wix"),
+ "--intermediate_dir",
+ rebase_path("$root_gen_dir/installation", root_build_dir),
+ "--target_arch",
+ msi_script_arch,
+ rebase_path("$root_out_dir/remoting-me2me-host-$current_os.zip",
+ root_build_dir),
+ rebase_path(outputs[0], root_build_dir),
+ ]
+ }
+ } else {
+ group("remoting_host_installation") {
+ }
+ }
+ }
+}
diff --git a/chromium/remoting/host/it2me/BUILD.gn b/chromium/remoting/host/it2me/BUILD.gn
new file mode 100644
index 00000000000..04c84884a4b
--- /dev/null
+++ b/chromium/remoting/host/it2me/BUILD.gn
@@ -0,0 +1,149 @@
+# 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_enable.gni")
+import("//remoting/remoting_srcs.gni")
+import("//remoting/remoting_locales.gni")
+
+if (is_win) {
+ import("//remoting/host/predefines_win.gni")
+}
+if (is_mac) {
+ import("//build/config/mac/rules.gni")
+}
+
+source_set("common") {
+ sources = rebase_path(
+ remoting_host_srcs_gypi_values.remoting_it2me_host_static_sources,
+ ".",
+ "//remoting")
+
+ if (is_android) {
+ sources -= [
+ "it2me_native_messaging_host.cc",
+ "it2me_native_messaging_host.h",
+ ]
+ }
+
+ configs += [
+ "//build/config/compiler:wexit_time_destructors",
+ "//remoting:version",
+ ]
+
+ deps = [
+ "//base:i18n",
+ "//net:net",
+ "//remoting/base",
+ "//remoting/host",
+ "//remoting/protocol",
+ "//remoting/resources",
+ ]
+}
+
+if (!is_chromeos && !is_android && enable_remoting_host) {
+ if (is_win) {
+ # GYP version:
+ # //remoting/remoting_host_win.gypi:remoting_it2me_native_messaging_host
+ executable("remote_assistance_host") {
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+
+ deps = [
+ "//base/allocator",
+ "//remoting/host:remoting_core",
+ "//remoting/host:remoting_windows_resources",
+ ]
+
+ sources = [
+ "$root_gen_dir/remoting/version.rc",
+ "it2me_native_messaging_host_entry_point.cc",
+ ]
+
+ defines = host_predefines + [ "BINARY=BINARY_REMOTE_ASSISTANCE_HOST" ]
+
+ ldflags = [
+ "/MANIFEST:EMBED",
+ "/MANIFESTINPUT:" +
+ rebase_path("../win/common-controls.manifest", root_build_dir),
+ "/MANIFESTINPUT:" +
+ rebase_path("../win/dpi_aware.manifest", root_build_dir),
+
+ # "/NODEFAULTLIB", TODO(zijiehe): Why IgnoreAllDefaultLibraries: true in
+ # GYP does not take effect?
+ "comctl32.lib",
+ ]
+ }
+ } else {
+ if (is_mac) {
+ app_target_type = "mac_app_bundle"
+
+ # remote_assistance_host-InfoPlist.strings
+ foreach(locale, remoting_locales_with_underscores) {
+ bundle_data("remote_assistance_host_strings_${locale}_bundle_data") {
+ sources = [
+ "$root_gen_dir/remoting/host/remote_assistance_host-InfoPlist.strings/$locale.lproj/InfoPlist.strings",
+ ]
+ outputs = [
+ "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
+ ]
+ deps = [
+ "//remoting/host:remoting_infoplist_strings",
+ ]
+ }
+ }
+ } else {
+ app_target_type = "executable"
+ }
+
+ target(app_target_type, "remote_assistance_host") {
+ if (is_mac) {
+ info_plist = "remote_assistance_host-Info.plist"
+ extra_configs = [
+ "//build/config/compiler:wexit_time_destructors",
+ "//remoting:version",
+ ]
+ } else {
+ configs += [
+ "//build/config/compiler:wexit_time_destructors",
+ "//remoting:version",
+ ]
+ }
+
+ sources = [
+ "it2me_native_messaging_host_entry_point.cc",
+ "it2me_native_messaging_host_main.cc",
+ "it2me_native_messaging_host_main.h",
+ ]
+
+ deps = [
+ ":common",
+ "//build/config/sanitizers:deps",
+ "//remoting/host",
+ "//remoting/host/native_messaging",
+ "//remoting/proto",
+ "//ui/gfx",
+ ]
+ if (is_mac) {
+ foreach(locale, remoting_locales_with_underscores) {
+ deps += [
+ ":remote_assistance_host_strings_${locale}_bundle_data",
+ "//remoting/host:remoting_host_locale_${locale}_bundle_data",
+ ]
+ }
+ deps += [
+ "//remoting/host:remoting_infoplist_strings",
+ "//remoting/resources:copy_locales",
+ ]
+ }
+
+ if (enable_webrtc) {
+ deps += [ "//third_party/libjingle:libjingle_webrtc" ]
+ }
+
+ if (is_desktop_linux) {
+ deps += [ "//build/config/linux/gtk2" ]
+ }
+ }
+ }
+}
diff --git a/chromium/remoting/host/native_messaging/BUILD.gn b/chromium/remoting/host/native_messaging/BUILD.gn
new file mode 100644
index 00000000000..afefee11de6
--- /dev/null
+++ b/chromium/remoting/host/native_messaging/BUILD.gn
@@ -0,0 +1,19 @@
+# Copyright 2015 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("//remoting/remoting_srcs.gni")
+
+# GYP version: remoting/remoting_host.gypi:remoting_native_messaging_base
+source_set("native_messaging") {
+ sources = rebase_path(
+ remoting_host_srcs_gypi_values.remoting_host_native_messaging_sources,
+ ".",
+ "//remoting")
+
+ configs += [ "//build/config/compiler:wexit_time_destructors" ]
+
+ deps = [
+ "//base",
+ ]
+}
diff --git a/chromium/remoting/host/predefines_win.gni b/chromium/remoting/host/predefines_win.gni
new file mode 100644
index 00000000000..34e934034c5
--- /dev/null
+++ b/chromium/remoting/host/predefines_win.gni
@@ -0,0 +1,20 @@
+# In Windows, we use the following defines to make sure certain resources are
+# embedded into one binary only.
+
+# GN config is always executed after defines, so if we would like to generate
+# defines ordered as
+# #define BINARY_CORE=1
+# #define BINARY=BINARY_CORE
+# we need to set these predefines as a list, and append others after it.
+
+assert(is_win)
+
+host_predefines = [
+ "BINARY_CORE=1", # For remoting_core
+ "BINARY_DESKTOP=2", # For remoting_desktop
+ "BINARY_HOST_ME2ME=3", # For remoting_console
+ "BINARY_NATIVE_MESSAGING_HOST=4", # For remoting_native_messaging_host
+ "BINARY_REMOTE_ASSISTANCE_HOST=5", # For remote_assistance_host
+ "BINARY_REMOTE_SECURITY_KEY=6", # For remote_security_key
+ "BINARY_REMOTING_START_HOST=7", # For remoting_start_host
+]
diff --git a/chromium/remoting/host/setup/BUILD.gn b/chromium/remoting/host/setup/BUILD.gn
new file mode 100644
index 00000000000..f43fe7b0920
--- /dev/null
+++ b/chromium/remoting/host/setup/BUILD.gn
@@ -0,0 +1,30 @@
+# Copyright 2015 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("//remoting/remoting_srcs.gni")
+
+source_set("setup") {
+ sources =
+ rebase_path(remoting_host_srcs_gypi_values.remoting_host_setup_sources,
+ ".",
+ "//remoting")
+
+ configs += [
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ "//build/config/compiler:no_size_t_to_int_warning",
+ "//build/config/compiler:wexit_time_destructors",
+ "//remoting:version",
+ ]
+
+ deps = [
+ "//base",
+ "//google_apis",
+ "//remoting/host",
+ "//remoting/host/native_messaging",
+ ]
+
+ if (is_win) {
+ deps += [ "//remoting/host:remoting_lib_idl" ]
+ }
+}
diff --git a/chromium/remoting/proto/BUILD.gn b/chromium/remoting/proto/BUILD.gn
new file mode 100644
index 00000000000..268b6239498
--- /dev/null
+++ b/chromium/remoting/proto/BUILD.gn
@@ -0,0 +1,16 @@
+# 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("//third_party/protobuf/proto_library.gni")
+
+proto_library("proto") {
+ sources = [
+ "audio.proto",
+ "control.proto",
+ "event.proto",
+ "internal.proto",
+ "mux.proto",
+ "video.proto",
+ ]
+}
diff --git a/chromium/remoting/protocol/BUILD.gn b/chromium/remoting/protocol/BUILD.gn
new file mode 100644
index 00000000000..50f686e3627
--- /dev/null
+++ b/chromium/remoting/protocol/BUILD.gn
@@ -0,0 +1,130 @@
+# 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_srcs.gni")
+
+source_set("protocol") {
+ sources = rebase_path(remoting_srcs_gypi_values.remoting_protocol_sources,
+ ".",
+ "//remoting")
+
+ 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/libjingle",
+ ]
+ deps = [
+ "//base",
+ "//crypto",
+ "//jingle:jingle_glue",
+ "//net",
+ "//remoting/base",
+ "//remoting/codec",
+ "//remoting/signaling",
+ "//third_party/boringssl",
+ "//third_party/libyuv",
+ ]
+
+ if (!is_nacl) {
+ sources +=
+ rebase_path(remoting_srcs_gypi_values.remoting_protocol_nonnacl_sources,
+ ".",
+ "//remoting")
+
+ if (enable_webrtc) {
+ deps += [ "//third_party/libjingle:libjingle_webrtc" ]
+ } else {
+ sources -= [
+ "webrtc_connection_to_client.cc",
+ "webrtc_transport.cc",
+ "webrtc_video_stream.cc",
+ ]
+ }
+ }
+}
+
+source_set("test_support") {
+ testonly = true
+
+ sources = [
+ "fake_authenticator.cc",
+ "fake_authenticator.h",
+ "fake_connection_to_client.cc",
+ "fake_connection_to_client.h",
+ "fake_connection_to_host.cc",
+ "fake_connection_to_host.h",
+ "fake_datagram_socket.cc",
+ "fake_datagram_socket.h",
+ "fake_desktop_capturer.cc",
+ "fake_desktop_capturer.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",
+ ]
+
+ public_deps = [
+ ":protocol",
+ "//testing/gmock",
+ ]
+}
+
+source_set("unit_tests") {
+ testonly = true
+
+ sources = [
+ "authenticator_test_base.cc",
+ "authenticator_test_base.h",
+ "capture_scheduler_unittest.cc",
+ "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",
+ "connection_unittest.cc",
+ "content_description_unittest.cc",
+ "http_ice_config_request_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",
+ "session_config_unittest.cc",
+ "spake2_authenticator_unittest.cc",
+ "ssl_hmac_channel_authenticator_unittest.cc",
+ "third_party_authenticator_unittest.cc",
+ "v2_authenticator_unittest.cc",
+ "video_frame_pump_unittest.cc",
+ "webrtc_transport_unittest.cc",
+ ]
+
+ deps = [
+ ":test_support",
+ "//net:test_support",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+}
diff --git a/chromium/remoting/remoting_enable.gni b/chromium/remoting/remoting_enable.gni
new file mode 100644
index 00000000000..d42a2e33338
--- /dev/null
+++ b/chromium/remoting/remoting_enable.gni
@@ -0,0 +1,23 @@
+# Copyright 2015 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.
+
+# Keep in sync with remoting/remoting_enable.gypi.
+
+import("//build/config/ui.gni")
+
+enable_remoting_host = false
+enable_me2me_host = false
+
+if (is_win || (is_linux && !is_chromeos && use_x11) || is_mac) {
+ enable_remoting_host = true
+ enable_me2me_host = true
+}
+
+if (is_linux && is_chromeos) {
+ enable_remoting_host = true
+}
+
+if (is_android) {
+ enable_remoting_host = true
+}
diff --git a/chromium/remoting/remoting_locales.gni b/chromium/remoting/remoting_locales.gni
new file mode 100644
index 00000000000..a9702de66ef
--- /dev/null
+++ b/chromium/remoting/remoting_locales.gni
@@ -0,0 +1,158 @@
+# Copyright 2015 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.
+
+webapp_locale_dir = "$root_gen_dir/remoting/webapp/_locales"
+
+# See also remoting_locales_with_underscores below.
+remoting_locales = [
+ "am",
+ "ar",
+ "bg",
+
+ "bn",
+ "ca",
+ "cs",
+ "da",
+ "de",
+ "el",
+ "en",
+ "en-GB",
+ "es",
+ "es-419",
+ "et",
+
+ "fa",
+ "fake-bidi",
+ "fi",
+ "fil",
+ "fr",
+
+ "gu",
+ "he",
+ "hi",
+ "hr",
+ "hu",
+ "id",
+ "it",
+ "ja",
+
+ "kn",
+ "ko",
+ "lt",
+ "lv",
+
+ "ml",
+ "mr",
+ "ms",
+ "nb",
+ "nl",
+ "pl",
+ "pt-BR",
+ "pt-PT",
+ "ro",
+ "ru",
+ "sk",
+ "sl",
+ "sr",
+ "sv",
+
+ "sw",
+ "ta",
+ "te",
+ "th",
+ "tr",
+ "uk",
+ "vi",
+ "zh-CN",
+ "zh-TW",
+]
+
+# Some locales have hyphens in the names but for some uses underscores are
+# needed.
+remoting_locales_with_underscores = remoting_locales
+remoting_locales_with_underscores -= [
+ "en-GB",
+ "es-419",
+
+ "fake-bidi",
+ "pt-BR",
+ "pt-PT",
+ "zh-CN",
+ "zh-TW",
+]
+remoting_locales_with_underscores += [
+ "en_GB",
+ "es_419",
+
+ "fake_bidi",
+ "pt_BR",
+ "pt_PT",
+ "zh_CN",
+ "zh_TW",
+]
+
+if (is_chromeos) {
+ remoting_locales += [ "en-US" ]
+ remoting_locales_with_underscores += [ "en_US" ]
+}
+
+messages_locales = remoting_locales_with_underscores
+if (!is_chromeos) {
+ # The messages output includes a separate one for en-US that the pak ones
+ # don't have. We don't need to do this on ChromeOS since en_US is in the
+ # locales list be default there.
+ messages_locales += [ "en_US" ]
+}
+
+remoting_android_locales = [
+ "am",
+ "ar",
+ "bg",
+ "ca",
+ "cs",
+ "da",
+ "de",
+ "el",
+ "en-rGB",
+ "es",
+ "es-rUS",
+ "fa",
+ "fi",
+ "fr",
+ "hi",
+ "hr",
+ "hu",
+ "in",
+ "it",
+ "iw",
+ "ja",
+ "ko",
+ "lt",
+ "lv",
+ "nb",
+ "nl",
+ "pl",
+ "pt-rBR",
+ "pt-rPT",
+ "ro",
+ "ru",
+ "sk",
+ "sl",
+ "sr",
+ "sv",
+ "sw",
+ "th",
+ "tl",
+ "tr",
+ "uk",
+ "vi",
+ "zh-rCN",
+ "zh-rTW",
+]
+
+# The list of .json files generated by remoting_strings.grd.
+remoting_webapp_locale_files =
+ process_file_template(
+ messages_locales,
+ [ "remoting/webapp/_locales/{{source_name_part}}/messages.json" ])
diff --git a/chromium/remoting/remoting_options.gni b/chromium/remoting/remoting_options.gni
new file mode 100644
index 00000000000..f16cbd37252
--- /dev/null
+++ b/chromium/remoting/remoting_options.gni
@@ -0,0 +1,45 @@
+# Copyright 2015 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")
+
+# These arguments can be overridden from the command line (see "gn help args").
+declare_args() {
+ # Set this to run the jscompile checks after building the webapp.
+ enable_remoting_jscompile = false
+
+ # Set this to enable building internal AppRemoting apps.
+ enable_internal_app_remoting_targets = false
+
+ # Set this to enable Android Chromoting Cardboard Activity.
+ remoting_enable_cardboard = false
+}
+
+# Set this to use GCD instead of the remoting directory service.
+remoting_use_gcd = 0
+
+# Enable the multi-process host on Windows by default.
+if (is_win) {
+ remoting_multi_process = 1
+} else {
+ remoting_multi_process = 0
+}
+
+remoting_rdp_session = 1
+
+if (is_chrome_branded) {
+ branding_path = "//remoting/branding_Chrome"
+} else {
+ branding_path = "//remoting/branding_Chromium"
+}
+
+# The ar_service_environment variable is used to define the target
+# environment for the app being built.
+# The allowed values are dev and prod.
+if (is_debug) {
+ ar_service_environment = "dev"
+} else {
+ # Non-dev builds should default to 'prod'.
+ ar_service_environment = "prod"
+}
diff --git a/chromium/remoting/remoting_srcs.gni b/chromium/remoting/remoting_srcs.gni
new file mode 100644
index 00000000000..fe87adf61af
--- /dev/null
+++ b/chromium/remoting/remoting_srcs.gni
@@ -0,0 +1,14 @@
+# Copyright 2015 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.
+
+remoting_srcs_gypi_values = exec_script("//build/gypi_to_gn.py",
+ [ rebase_path("remoting_srcs.gypi") ],
+ "scope",
+ [ "remoting_srcs.gypi" ])
+
+remoting_host_srcs_gypi_values =
+ exec_script("//build/gypi_to_gn.py",
+ [ rebase_path("remoting_host_srcs.gypi") ],
+ "scope",
+ [ "remoting_host_srcs.gypi" ])
diff --git a/chromium/remoting/remoting_version.gni b/chromium/remoting/remoting_version.gni
new file mode 100644
index 00000000000..13e5162bfbb
--- /dev/null
+++ b/chromium/remoting/remoting_version.gni
@@ -0,0 +1,46 @@
+# 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/chrome_build.gni")
+
+_version_py_abspath = "//build/util/version.py"
+_remoting_version_abspath = "//remoting/VERSION"
+if (is_chrome_branded) {
+ _remoting_branding_abspath = "//remoting/branding_Chrome"
+} else {
+ _remoting_branding_abspath = "//remoting/branding_Chromium"
+}
+
+# Set these files as being input dependencies to the scripts, so the build will
+# be re-run if the files change.
+remoting_version_files = [
+ _remoting_version_abspath,
+ _remoting_branding_abspath,
+]
+
+_remoting_version_path = rebase_path(_remoting_version_abspath, root_build_dir)
+_remoting_branding_path =
+ rebase_path(_remoting_branding_abspath, root_build_dir)
+
+_branding_dictionary_template = "mac_host_bundle = \"@MAC_HOST_BUNDLE_NAME@\" " + "mac_native_messaging_bundle = \"@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@\" " + "mac_remote_assistance_bundle = \"@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@\" " + "prefpane_bundle_name = \"@MAC_PREFPANE_BUNDLE_NAME@\" " + "host_bundle_name = \"@MAC_HOST_BUNDLE_NAME@\" " + "host_name= \"@MAC_HOST_PACKAGE_NAME@\" " + "host_service_name = \"@DAEMON_FILE_NAME@\" " + "bundle_prefix = \"@MAC_UNINSTALLER_BUNDLE_PREFIX@\" " + "host_uninstaller_name = \"@MAC_UNINSTALLER_NAME@\""
+
+_result = exec_script(_version_py_abspath,
+ [
+ "-f",
+ _remoting_branding_path,
+ "-t",
+ _branding_dictionary_template,
+ ],
+ "scope",
+ remoting_version_files)
+
+prefpane_bundle_name = _result.prefpane_bundle_name
+host_bundle_name = _result.host_bundle_name
+host_name = _result.host_name
+host_service_name = _result.host_service_name
+bundle_prefix = _result.bundle_prefix
+host_uninstaller_name = _result.host_uninstaller_name
+me2me_host_bundle_name = _result.mac_host_bundle
+native_messaging_host_bundle_name = _result.mac_native_messaging_bundle
+remote_assistance_host_bundle_name = _result.mac_remote_assistance_bundle
diff --git a/chromium/remoting/resources/BUILD.gn b/chromium/remoting/resources/BUILD.gn
new file mode 100644
index 00000000000..3cc91d80167
--- /dev/null
+++ b/chromium/remoting/resources/BUILD.gn
@@ -0,0 +1,146 @@
+# 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("//remoting/remoting_locales.gni")
+import("//tools/grit/grit_rule.gni")
+
+if (is_android) {
+ import("//build/config/android/rules.gni")
+}
+
+group("resources") {
+ public_deps = [
+ ":copy_locales",
+ ":strings",
+ ":verify_resources",
+ ]
+}
+
+# TODO(GYP) enable verify_resources. The bots are complaining about
+# gen/main.html not being found but this doesn't seems to reproduce locally.
+
+action("verify_resources") {
+ script = "//remoting/tools/verify_resources.py"
+
+ sources_to_verify = [
+ # "$root_gen_dir/main.html",
+ "../host/continue_window_mac.mm",
+ "../host/disconnect_window_mac.mm",
+ "../host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2",
+ "../host/mac/me2me_preference_pane-InfoPlist.strings.jinja2",
+ "../host/win/core.rc.jinja2",
+ "../host/win/host_messages.mc.jinja2",
+ "../host/win/version.rc.jinja2",
+ "../resources/play_store_resources.cc",
+ "../webapp/crd/js/background.js",
+ "../webapp/crd/js/butter_bar.js",
+ "../webapp/base/js/error.js",
+ "../webapp/crd/js/host_list.js",
+ "../webapp/crd/js/host_setup_dialog.js",
+ "../webapp/crd/js/host_table_entry.js",
+ "../webapp/crd/manifest.json.jinja2",
+ "../webapp/crd/js/paired_client_manager.js",
+ "../webapp/crd/js/desktop_remoting.js",
+ "../webapp/crd/js/window_frame.js",
+ ]
+
+ inputs = [ "remoting_strings.grd" ] + sources_to_verify
+
+ stampfile = "$root_build_dir/remoting_resources_verified_stamp"
+ outputs = [
+ stampfile,
+ ]
+
+ args = [
+ "-t",
+ rebase_path(stampfile, root_build_dir),
+ "-r",
+ rebase_path("remoting_strings.grd", root_build_dir),
+ ] + rebase_path(sources_to_verify, root_build_dir)
+
+ deps = [
+ # "//remoting/webapp:webapp",
+ ] # Generates main.html.
+}
+
+if (is_android) {
+ android_string_outputs =
+ [ "remoting/android/res/values/remoting_strings.xml" ]
+ android_string_outputs += process_file_template(
+ remoting_android_locales,
+ [ "remoting/android/res/values-{{source_name_part}}/remoting_strings.xml" ])
+}
+
+grit("strings") {
+ source = "remoting_strings.grd"
+ output_name = "remoting_strings"
+
+ # The grd file encodes "remoting/..." in the name, so root everything in the
+ # generated file root.
+ output_dir = root_gen_dir
+
+ outputs = [
+ "remoting/base/string_resources.h",
+ ]
+
+ # The grd produces a *.pak file and a messages.json file (this one uses
+ # underscores instead of hyphens) for each locale.
+ outputs +=
+ process_file_template(remoting_locales,
+ [ "remoting/resources/{{source_name_part}}.pak" ])
+
+ outputs += remoting_webapp_locale_files
+
+ if (is_android) {
+ outputs += android_string_outputs
+ }
+}
+
+if (is_android) {
+ java_strings_grd_prebuilt("strings_java") {
+ grit_output_dir = "$root_gen_dir/remoting/android/res"
+ generated_files =
+ rebase_path(android_string_outputs, "remoting/android/res", ".")
+ deps = [
+ ":strings",
+ ]
+ }
+}
+
+action("copy_locales") {
+ script = "../tools/build/remoting_copy_locales.py"
+
+ # The gyp build calls out to Python, but the Python just computes a simple
+ # replacement over the locales. Here, we can do this in GN script by
+ # pretending the locale list is a list of files. The {{source_name_part}}
+ # will just expand to the locale name.
+ inputs = process_file_template(remoting_locales,
+ [ "$target_gen_dir/{{source_name_part}}.pak" ])
+
+ # Likewise, process the outputs in the same way as the inputs.
+ if (is_mac || is_ios) {
+ # On mac, use underscores instead of hyphens and put the files in a
+ # different place.
+ outputs = process_file_template(
+ remoting_locales_with_underscores,
+ [ "$root_build_dir/remoting/resources/{{source_name_part}}.lproj/locale.pak" ])
+ } else {
+ outputs = process_file_template(
+ remoting_locales,
+ [ "$root_build_dir/remoting_locales/{{source_name_part}}.pak" ])
+ }
+
+ args = [
+ "-p",
+ current_os,
+ "-g",
+ rebase_path(root_gen_dir, root_build_dir),
+ "-x",
+ rebase_path(root_out_dir, root_build_dir),
+ ] + remoting_locales
+
+ deps = [
+ ":strings",
+ ]
+}
diff --git a/chromium/remoting/signaling/BUILD.gn b/chromium/remoting/signaling/BUILD.gn
new file mode 100644
index 00000000000..db2cf9820be
--- /dev/null
+++ b/chromium/remoting/signaling/BUILD.gn
@@ -0,0 +1,75 @@
+# Copyright 2015 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("//remoting/remoting_srcs.gni")
+
+source_set("signaling") {
+ sources = rebase_path(remoting_srcs_gypi_values.remoting_signaling_sources,
+ ".",
+ "//remoting")
+
+ configs += [
+ "//build/config/compiler:no_size_t_to_int_warning",
+ "//build/config/compiler:wexit_time_destructors",
+ ]
+
+ public_deps = [
+ "//remoting/proto",
+ "//third_party/libjingle",
+ ]
+
+ deps = [
+ "//base",
+ "//crypto",
+ "//jingle:jingle_glue",
+ "//net",
+ "//remoting/base",
+ ]
+
+ if (is_nacl) {
+ sources -= [
+ "log_to_server.cc",
+ "server_log_entry.cc",
+ "xmpp_signal_strategy.cc",
+ ]
+ }
+}
+
+source_set("test_support") {
+ testonly = true
+
+ sources = [
+ "fake_signal_strategy.cc",
+ "fake_signal_strategy.h",
+ "mock_signal_strategy.cc",
+ "mock_signal_strategy.h",
+ ]
+
+ public_deps = [
+ ":signaling",
+ "//testing/gmock",
+ ]
+}
+
+source_set("unit_tests") {
+ testonly = true
+
+ sources = [
+ "iq_sender_unittest.cc",
+ "jid_util_unittest.cc",
+ "log_to_server_unittest.cc",
+ "push_notification_subscriber_unittest.cc",
+ "server_log_entry_unittest.cc",
+ "server_log_entry_unittest.h",
+ "xmpp_login_handler_unittest.cc",
+ "xmpp_signal_strategy_unittest.cc",
+ "xmpp_stream_parser_unittest.cc",
+ ]
+
+ deps = [
+ ":test_support",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+}
diff --git a/chromium/remoting/test/BUILD.gn b/chromium/remoting/test/BUILD.gn
new file mode 100644
index 00000000000..ef371e640ab
--- /dev/null
+++ b/chromium/remoting/test/BUILD.gn
@@ -0,0 +1,225 @@
+# Copyright 2015 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("//remoting/remoting_enable.gni")
+
+source_set("test_support") {
+ testonly = true
+
+ sources = [
+ "access_token_fetcher.cc",
+ "access_token_fetcher.h",
+ "app_remoting_report_issue_request.cc",
+ "app_remoting_report_issue_request.h",
+ "app_remoting_service_urls.cc",
+ "app_remoting_service_urls.h",
+ "chromoting_test_driver_environment.cc",
+ "chromoting_test_driver_environment.h",
+ "connection_setup_info.cc",
+ "connection_setup_info.h",
+ "connection_time_observer.cc",
+ "connection_time_observer.h",
+ "cyclic_frame_generator.cc",
+ "cyclic_frame_generator.h",
+ "fake_access_token_fetcher.cc",
+ "fake_access_token_fetcher.h",
+ "fake_app_remoting_report_issue_request.cc",
+ "fake_app_remoting_report_issue_request.h",
+ "fake_host_list_fetcher.cc",
+ "fake_host_list_fetcher.h",
+ "fake_network_dispatcher.cc",
+ "fake_network_dispatcher.h",
+ "fake_network_manager.cc",
+ "fake_network_manager.h",
+ "fake_port_allocator.cc",
+ "fake_port_allocator.h",
+ "fake_refresh_token_store.cc",
+ "fake_refresh_token_store.h",
+ "fake_remote_host_info_fetcher.cc",
+ "fake_remote_host_info_fetcher.h",
+ "fake_socket_factory.cc",
+ "fake_socket_factory.h",
+ "host_info.cc",
+ "host_info.h",
+ "host_list_fetcher.cc",
+ "host_list_fetcher.h",
+ "leaky_bucket.cc",
+ "leaky_bucket.h",
+ "mock_access_token_fetcher.cc",
+ "mock_access_token_fetcher.h",
+ "refresh_token_store.cc",
+ "refresh_token_store.h",
+ "remote_application_details.h",
+ "remote_connection_observer.h",
+ "remote_host_info.cc",
+ "remote_host_info.h",
+ "remote_host_info_fetcher.cc",
+ "remote_host_info_fetcher.h",
+ "rgb_value.cc",
+ "rgb_value.h",
+ "test_chromoting_client.cc",
+ "test_chromoting_client.h",
+ "test_video_renderer.cc",
+ "test_video_renderer.h",
+ "video_frame_writer.cc",
+ "video_frame_writer.h",
+ ]
+
+ public_deps = [
+ "//base",
+ "//net",
+ "//remoting/base",
+ "//remoting/client",
+ "//remoting/codec",
+ "//remoting/protocol",
+ "//remoting/signaling",
+ "//third_party/webrtc/modules/desktop_capture",
+ "//ui/gfx",
+ ]
+
+ deps = [
+ "//google_apis",
+ "//skia",
+ "//testing/gmock",
+ "//testing/gtest",
+ "//third_party/libjingle",
+ ]
+}
+
+executable("chromoting_test_driver") {
+ testonly = true
+
+ sources = [
+ "chromoting_test_driver.cc",
+ "chromoting_test_driver_tests.cc",
+ "chromoting_test_fixture.cc",
+ "chromoting_test_fixture.h",
+ ]
+
+ deps = [
+ ":test_support",
+ "//base/test:test_support",
+ "//build/config/sanitizers:deps",
+ "//build/win:default_exe_manifest",
+ "//testing/gtest",
+ ]
+}
+
+source_set("ar_test_driver_common") {
+ testonly = true
+
+ sources = [
+ "app_remoting_connected_client_fixture.cc",
+ "app_remoting_connected_client_fixture.h",
+ "app_remoting_connection_helper.cc",
+ "app_remoting_connection_helper.h",
+ "app_remoting_latency_test_fixture.cc",
+ "app_remoting_latency_test_fixture.h",
+ "app_remoting_test_driver_environment.cc",
+ "app_remoting_test_driver_environment.h",
+ ]
+
+ deps = [
+ ":test_support",
+ "//testing/gtest",
+ "//third_party/webrtc/modules/desktop_capture",
+ ]
+}
+
+# An external version of the test driver tool which includes minimal tests
+executable("ar_sample_test_driver") {
+ testonly = true
+
+ sources = [
+ "app_remoting_sample_test_driver_environment.cc",
+ "app_remoting_test_driver.cc",
+ ]
+
+ deps = [
+ ":ar_test_driver_common",
+ "//base/test:test_support",
+ "//build/config/sanitizers:deps",
+ "//build/win:default_exe_manifest",
+ "//testing/gtest",
+ ]
+}
+
+if (enable_remoting_host && !is_android && !is_chromeos) {
+ static_library("fake_connection_event_logger") {
+ testonly = true
+
+ sources = [
+ "fake_connection_event_logger.cc",
+ "fake_connection_event_logger.h",
+ ]
+
+ deps = [
+ "//remoting/host",
+ "//remoting/protocol:test_support",
+ ]
+ }
+
+ static_library("it2me_standalone_host") {
+ testonly = true
+
+ sources = [
+ "it2me_standalone_host.cc",
+ "it2me_standalone_host.h",
+ ]
+
+ deps = [
+ ":fake_connection_event_logger",
+ "//third_party/webrtc/modules/desktop_capture",
+ ]
+
+ public_deps = [
+ "//remoting/host:test_support",
+ "//testing/gmock",
+ ]
+ }
+
+ executable("it2me_standalone_host_main") {
+ testonly = true
+
+ sources = [
+ "it2me_standalone_host_main.cc",
+ ]
+
+ deps = [
+ ":it2me_standalone_host",
+ "//build/win:default_exe_manifest",
+ ]
+
+ if (is_desktop_linux) {
+ deps += [ "//build/config/linux/gtk2" ]
+ }
+ }
+}
+
+source_set("unit_tests") {
+ testonly = true
+
+ sources = [
+ "access_token_fetcher_unittest.cc",
+ "app_remoting_report_issue_request_unittest.cc",
+ "app_remoting_test_driver_environment_unittest.cc",
+ "chromoting_test_driver_environment_unittest.cc",
+ "connection_time_observer_unittest.cc",
+ "host_list_fetcher_unittest.cc",
+ "remote_host_info_fetcher_unittest.cc",
+ "test_chromoting_client_unittest.cc",
+ "test_video_renderer_unittest.cc",
+ ]
+
+ deps = [
+ ":ar_test_driver_common",
+ ":test_support",
+ "//base",
+ "//net:test_support",
+ "//testing/gmock",
+ "//testing/gtest",
+ "//third_party/libyuv",
+ "//third_party/webrtc/modules/desktop_capture",
+ ]
+}
diff --git a/chromium/remoting/tools/build/remoting_localize.gni b/chromium/remoting/tools/build/remoting_localize.gni
new file mode 100644
index 00000000000..54ff46e27f8
--- /dev/null
+++ b/chromium/remoting/tools/build/remoting_localize.gni
@@ -0,0 +1,113 @@
+# Copyright 2015 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.
+
+# Calls the remoting_localize script with a jinja2 template.
+#
+# Arguments
+#
+# sources (required)
+# List of jinja2 files to load. This is the template.
+#
+# locales (required)
+# List of locales.
+#
+# locale_dir (optional)
+#
+# defines (optional)
+# List of defines to pass to script.
+# Example: defines = [ "FOO_HOST_PATH=bar" ]
+#
+# variables (optional)
+# List of variables to pass to script.
+#
+# output (optiona)
+# Substitution pattern for the output. Defaults to a file in the target
+# gen dir with the extension stripped (normally the extension is ".jinja2"
+# which then leaves the non-tempaltized file name).
+# TODO(brettw) Need locale_output. This is a per-locale output file.
+#
+# encoding (optional)
+# String.
+#
+# deps (optional)
+# visibility (optional)
+template("remoting_localize") {
+ action_foreach(target_name) {
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+
+ script = "//remoting/tools/build/remoting_localize.py"
+
+ sources = invoker.sources
+
+ if (defined(invoker.output)) {
+ outputs = [
+ invoker.output,
+ ]
+ } else {
+ outputs = [
+ "$target_gen_dir/{{source_name_part}}",
+ ]
+ }
+
+ args = []
+
+ if (defined(invoker.locale_dir)) {
+ args += [
+ "--locale_dir",
+ rebase_path(invoker.locale_dir, root_build_dir),
+ ]
+ }
+
+ # Add defines to command line.
+ if (defined(invoker.defines)) {
+ foreach(i, invoker.defines) {
+ args += [
+ "--define",
+ i,
+ ]
+ }
+ }
+
+ # Add variables to command line.
+ if (defined(invoker.variables)) {
+ foreach(i, invoker.variables) {
+ args += [
+ "--variables",
+ i,
+ ]
+ }
+ }
+
+ # The template file is required.
+ args += [
+ "--template",
+ "{{source}}",
+ ]
+
+ args += [
+ "--output",
+ rebase_path(outputs[0], root_build_dir),
+ ]
+
+ if (defined(invoker.encoding)) {
+ args += [
+ "--encoding",
+ invoker.encoding,
+ ]
+ }
+
+ args += invoker.locales
+
+ if (defined(invoker.deps)) {
+ deps = invoker.deps
+ } else {
+ deps = []
+ }
+
+ # This script reads the messages strings from the generated resource files.
+ deps += [ "//remoting/resources:strings" ]
+ }
+}
diff --git a/chromium/remoting/tools/javascript_key_tester/BUILD.gn b/chromium/remoting/tools/javascript_key_tester/BUILD.gn
new file mode 100644
index 00000000000..3fea7683921
--- /dev/null
+++ b/chromium/remoting/tools/javascript_key_tester/BUILD.gn
@@ -0,0 +1,48 @@
+# Copyright 2015 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")
+
+if (enable_nacl) {
+ group("javascript_key_tester") {
+ deps = [
+ ":javascript_key_tester_copies",
+ ]
+ }
+
+ copy("javascript_key_tester_copies") {
+ pexe_dir = get_label_info(
+ "pnacl:remoting_key_tester_newlib(//build/toolchain/nacl:newlib_pnacl)",
+ "root_out_dir")
+
+ sources = [
+ "$pexe_dir/remoting_key_tester_newlib.pexe",
+ "background.js",
+ "chord_tracker.js",
+ "event_listeners.js",
+ "icon_128.png",
+ "main.css",
+ "main.html",
+ "main.js",
+ "manifest.json",
+ "pnacl/remoting_key_tester.nmf",
+ ]
+
+ outputs = [
+ "$target_out_dir/remoting/key_tester/{{source_file_part}}",
+ ]
+
+ deps = [
+ ":javascript_key_tester_jscompile",
+ "pnacl:remoting_key_tester_newlib(//build/toolchain/nacl:newlib_pnacl)",
+ ]
+ }
+
+ group("javascript_key_tester_jscompile") {
+ # TODO(GYP): crbug.com/471926 add support for run_jscompile=true.
+ run_jscompile = false
+ if (run_jscompile) {
+ }
+ }
+}
diff --git a/chromium/remoting/tools/javascript_key_tester/pnacl/BUILD.gn b/chromium/remoting/tools/javascript_key_tester/pnacl/BUILD.gn
new file mode 100644
index 00000000000..fbd8935123f
--- /dev/null
+++ b/chromium/remoting/tools/javascript_key_tester/pnacl/BUILD.gn
@@ -0,0 +1,18 @@
+# Copyright 2015 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.
+
+assert(is_nacl,
+ "These targets must only be built using the untrusted NaCl toolchains.")
+
+executable("remoting_key_tester_newlib") {
+ sources = [
+ "remoting_key_tester.cc",
+ ]
+
+ deps = [
+ "//build/config/sanitizers:deps",
+ "//ppapi/cpp",
+ "//ppapi/native_client:ppapi_lib",
+ ]
+}
diff --git a/chromium/remoting/webapp/BUILD.gn b/chromium/remoting/webapp/BUILD.gn
new file mode 100644
index 00000000000..bbc36635d29
--- /dev/null
+++ b/chromium/remoting/webapp/BUILD.gn
@@ -0,0 +1,108 @@
+# 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.
+
+# Keep in sync with targets in remoting/remoting_client.gypi.
+
+import("//build/config/features.gni")
+import("//remoting/webapp/build_template.gni")
+import("//remoting/webapp/files.gni")
+
+# GYP version: remoting/remoting_client:remoting_credits
+action("credits") {
+ about_credits_file = "$target_gen_dir/credits.html"
+ script = "//tools/licenses.py"
+
+ inputs = [
+ "base/html/credits.tmpl",
+ "base/html/credits_entry.tmpl",
+ ]
+
+ outputs = [
+ about_credits_file,
+ ]
+
+ args = [
+ "credits",
+ rebase_path(about_credits_file, root_build_dir),
+ "--file-template",
+ rebase_path("base/html/credits.tmpl", root_build_dir),
+ "--entry-template",
+ rebase_path("base/html/credits_entry.tmpl", root_build_dir),
+ ]
+}
+
+desktop_remoting_webapp("webapp") {
+ output_dir = "$root_build_dir/remoting/remoting-webapp.v2"
+ zip_path = "$root_build_dir/remoting-webapp.v2.zip"
+ extra_files = [ "crd/remoting_client_pnacl.nmf.jinja2" ]
+}
+
+# GYP version: remoting/remoting_tests.gypi:remoting_browser_test_resources
+copy("browser_test_resources") {
+ sources = remoting_webapp_browsertest_main_html_extra_files
+ outputs = [
+ "$root_out_dir/remoting/browser_test_resources/{{source_file_part}}",
+ ]
+}
+
+remoting_unit_test_out_dir = "$root_out_dir/remoting/unittests"
+
+group("unit_tests") {
+ data_deps = [
+ ":blanketjs",
+ ":unittest_html",
+ ":js_files",
+ ":qunit",
+ ":sinonjs",
+ ]
+}
+
+copy("js_files") {
+ # This list corresponds to webapp_js_files in remoting_webapp_unittests
+ # target in GYP.
+ sources = webapp_js_files + remoting_webapp_unittests_all_files
+ outputs = [
+ "$remoting_unit_test_out_dir/{{source_file_part}}",
+ ]
+}
+
+copy("blanketjs") {
+ sources = [
+ "//third_party/blanketjs/src/blanket.js",
+ "//third_party/blanketjs/src/qunit_adapter.js",
+ ]
+ outputs = [
+ "$remoting_unit_test_out_dir/blanketjs/{{source_file_part}}",
+ ]
+}
+
+copy("sinonjs") {
+ sources = [
+ "//third_party/sinonjs/src/sinon-qunit.js",
+ "//third_party/sinonjs/src/sinon.js",
+ ]
+ outputs = [
+ "$remoting_unit_test_out_dir/sinonjs/{{source_file_part}}",
+ ]
+}
+
+copy("qunit") {
+ sources = [
+ "//third_party/qunit/src/browser_test_harness.js",
+ "//third_party/qunit/src/qunit.css",
+ "//third_party/qunit/src/qunit.js",
+ ]
+ outputs = [
+ "$remoting_unit_test_out_dir/qunit/{{source_file_part}}",
+ ]
+}
+
+build_webapp_html("unittest_html") {
+ html_template_file = remoting_webapp_unittests_template_main
+ html_template_include_files = []
+ js_files = remoting_webapp_unittests_all_js_files
+ html_output = "$remoting_unit_test_out_dir/unittests.html"
+ exclude_js = remoting_webapp_unittests_exclude_js_files
+ instrument_js = webapp_js_files
+}
diff --git a/chromium/remoting/webapp/build_template.gni b/chromium/remoting/webapp/build_template.gni
new file mode 100644
index 00000000000..df443fb5c0c
--- /dev/null
+++ b/chromium/remoting/webapp/build_template.gni
@@ -0,0 +1,299 @@
+# Copyright 2015 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.
+
+# Keep in sync with 'remoting_webapp' target in remoting/remoting_client.gypi.
+
+import("//build/config/chrome_build.gni")
+import("//build/config/features.gni")
+import("//build/util/version.gni")
+import("//remoting/remoting_locales.gni")
+import("//remoting/remoting_options.gni")
+import("//remoting/remoting_version.gni")
+import("//remoting/webapp/files.gni")
+import("//third_party/closure_compiler/closure_args.gni")
+
+# The base remoting directory that is used as the root directory for file
+# references. Many of the scripts rely on the files being specified relative
+# to this directory.
+remoting_dir = "//remoting"
+
+buildtype = "Dev"
+if (!is_debug) {
+ if (is_official_build) {
+ buildtype = "Official"
+ } else {
+ buildtype = "Release"
+ }
+}
+
+template("build_locales_listfile") {
+ action(target_name) {
+ locales_listfile_output = invoker.locales_listfile_output
+
+ script = "../tools/build/remoting_localize.py"
+
+ inputs = []
+ outputs = [
+ locales_listfile_output,
+ ]
+
+ args = [
+ "--locale_output",
+ rebase_path(webapp_locale_dir, root_build_dir) +
+ "/@{json_suffix}/messages.json",
+ "--locales_listfile",
+ rebase_path(locales_listfile_output, root_build_dir),
+ ]
+ args += remoting_locales
+ }
+}
+
+template("build_webapp_html") {
+ target_jscompile = ""
+
+ # Do not enable JSCompile on instrumented builds.
+ if (enable_remoting_jscompile && invoker.instrument_js == []) {
+ target_jscompile = "${target_name}_jscompile"
+ target_jscompile_stamp = "$target_gen_dir/${target_jscompile}.stamp"
+ action(target_jscompile) {
+ js_files = remoting_webapp_js_proto_files + invoker.js_files
+ externs =
+ remoting_webapp_js_externs_files + [
+ "../../third_party/closure_compiler/externs/chrome_extensions.js",
+ "../../third_party/closure_compiler/externs/metrics_private.js",
+ ]
+
+ script = "../../third_party/closure_compiler/compile.py"
+ inputs = js_files
+ outputs = [
+ target_jscompile_stamp,
+ ]
+
+ extra_closure_args = [
+ "jscomp_error=reportUnknownTypes",
+ "jscomp_error=duplicate",
+ "jscomp_error=misplacedTypeAnnotation",
+ ]
+
+ args = rebase_path(js_files, root_build_dir)
+ args += [
+ "--no-single-file",
+ "--out-file",
+ rebase_path(target_jscompile_stamp, root_build_dir),
+ "--closure-args",
+ ] + closure_args + extra_closure_args
+ args += [ "--externs" ] + rebase_path(externs, root_build_dir)
+ }
+ }
+
+ action(target_name) {
+ html_template_file = invoker.html_template_file
+ html_template_include_files = invoker.html_template_include_files
+ js_files = invoker.js_files
+ html_output = invoker.html_output
+ exclude_js = invoker.exclude_js
+ instrument_js = invoker.instrument_js
+
+ script = rebase_path("//remoting/webapp/build-html.py")
+
+ # Create a file that contains a list of all the JavaScript files needed
+ # to build the unit test page. This is needed to avoid problems on platforms
+ # that limit the size of a command line.
+ file_list = "$target_gen_dir/${target_name}_files.txt"
+ files = rebase_path(js_files, root_build_dir)
+ write_file(file_list, files)
+
+ inputs = [ html_template_file ] + html_template_include_files + js_files
+
+ outputs = [
+ html_output,
+ ]
+
+ if (target_jscompile != "") {
+ deps = [
+ ":$target_jscompile",
+ ]
+ }
+
+ args = [
+ rebase_path(html_output, root_build_dir),
+ rebase_path(html_template_file, root_build_dir),
+ ]
+ args += [
+ "--template-dir",
+ rebase_path(remoting_dir, root_build_dir),
+ ]
+ args += [ "--templates" ] + html_template_include_files
+ args += [
+ "--js-list-file",
+ rebase_path(file_list, root_build_dir),
+ ]
+ args += [ "--templates" ] + html_template_include_files
+ args += [
+ "--js-list-file",
+ rebase_path(file_list, root_build_dir),
+ ]
+ args += [ "--exclude-js" ] + rebase_path(exclude_js, root_build_dir)
+ args += [ "--instrument-js" ] + rebase_path(instrument_js, root_build_dir)
+ }
+}
+
+template("desktop_remoting_webapp") {
+ locales_listfile = target_name + "_locales"
+ locales_listfile_output = "$target_gen_dir/${target_name}_locales.txt"
+
+ build_locales_listfile(locales_listfile) {
+ # Template uses locales_listfile_output from outer scope.
+ }
+
+ background_html = target_name + "_background_html"
+ background_html_output = "$target_gen_dir/html/$target_name/background.html"
+
+ build_webapp_html(background_html) {
+ html_template_file = remoting_webapp_template_background
+ html_template_include_files = []
+ js_files = remoting_webapp_background_html_all_js_files
+ html_output = background_html_output
+ exclude_js = []
+ instrument_js = []
+ }
+
+ message_window_html = target_name + "_message_window_html"
+ message_window_html_output =
+ "$target_gen_dir/html/$target_name/message_window.html"
+
+ build_webapp_html(message_window_html) {
+ html_template_file = remoting_webapp_template_message_window
+ html_template_include_files = []
+ js_files = remoting_webapp_message_window_html_all_js_files
+ html_output = message_window_html_output
+ exclude_js = []
+ instrument_js = []
+ }
+
+ wcs_sandbox_html = target_name + "_wcs_sandbox_html"
+ wcs_sandbox_html_output = "$target_gen_dir/html/$target_name/wcs_sandbox.html"
+
+ build_webapp_html(wcs_sandbox_html) {
+ html_template_file = remoting_webapp_template_wcs_sandbox
+ html_template_include_files = []
+ js_files = remoting_webapp_wcs_sandbox_html_all_js_files
+ html_output = wcs_sandbox_html_output
+ exclude_js = []
+ instrument_js = []
+ }
+
+ main_html = target_name + "_main_html"
+ main_html_output = "$target_gen_dir/html/$target_name/main.html"
+
+ build_webapp_html(main_html) {
+ html_template_file = remoting_webapp_template_main
+ html_template_include_files = remoting_webapp_template_files
+ js_files = remoting_webapp_crd_main_html_all_js_files
+ html_output = main_html_output
+ exclude_js = []
+ instrument_js = []
+ }
+
+ public_session_html = target_name + "_public_session_html"
+ public_session_html_output =
+ "$target_gen_dir/html/$target_name/public_session.html"
+
+ build_webapp_html(public_session_html) {
+ html_template_file = remoting_webapp_template_public_session
+ html_template_include_files = remoting_webapp_public_session_template_files
+ js_files = remoting_webapp_public_session_html_all_js_files
+ html_output = public_session_html_output
+ exclude_js = []
+ instrument_js = []
+ }
+
+ action(target_name) {
+ script = "//remoting/webapp/build-webapp.py"
+
+ output_dir = invoker.output_dir
+ zip_path = invoker.zip_path
+ extra_files = invoker.extra_files
+
+ dr_generated_html_files = [
+ background_html_output,
+ message_window_html_output,
+ wcs_sandbox_html_output,
+ main_html_output,
+ public_session_html_output,
+ "$target_gen_dir/credits.html",
+ ]
+
+ # Windows debug builds of remoting_client_plugin_newlib.pexe trigger OOM in
+ # arm-nacl-ld.gold.exe - enable for release builds only on Windows.
+ if (enable_nacl && (!is_win || !is_debug)) {
+ pnacl_tc = "//build/toolchain/nacl:newlib_pnacl"
+ pexe_label = "//remoting/client/plugin:remoting_client_plugin_newlib"
+ pexe_dir = get_label_info("${pexe_label}($pnacl_tc)", "root_out_dir")
+
+ extra_files += [ "$pexe_dir/remoting_client_plugin_newlib.pexe" ]
+ if (is_debug) {
+ extra_files += [ "$pexe_dir/remoting_client_plugin_newlib.pexe.debug" ]
+ }
+ }
+
+ inputs = [ rebase_path("crd/manifest.json.jinja2") ] +
+ remoting_version_files + rebase_path(remoting_webapp_crd_files) +
+ extra_files + dr_generated_html_files
+
+ outputs = [
+ zip_path,
+ ]
+
+ deps = [
+ ":$background_html",
+ ":$locales_listfile",
+ ":$main_html",
+ ":$message_window_html",
+ ":$public_session_html",
+ ":$wcs_sandbox_html",
+ "//remoting/resources",
+ "//remoting/webapp:credits",
+ ]
+
+ # Windows debug builds of remoting_client_plugin_newlib.pexe trigger OOM in
+ # arm-nacl-ld.gold.exe - enable for release builds only on Windows.
+ if (enable_nacl && (!is_win || !is_debug)) {
+ deps += [ "${pexe_label}($pnacl_tc)" ]
+ if (is_debug) {
+ deps += [ "${pexe_label}_debug($pnacl_tc)" ]
+ }
+ }
+
+ # Create a file that contains a list of all the resource files needed
+ # to build the webapp. This is needed to avoid problems on platforms that
+ # limit the size of a command line.
+ file_list = "$target_gen_dir/${target_name}_files.txt"
+ files = []
+ files += rebase_path(dr_generated_html_files, root_build_dir)
+ files += rebase_path(remoting_webapp_crd_files, root_build_dir)
+ files += rebase_path(extra_files, root_build_dir)
+ write_file(file_list, files)
+
+ args = [
+ buildtype,
+ chrome_version_full,
+ rebase_path(output_dir, root_build_dir),
+ rebase_path(zip_path, root_build_dir),
+ rebase_path("crd/manifest.json.jinja2", root_build_dir),
+ ]
+ args += [
+ "--files_listfile",
+ rebase_path(file_list, root_build_dir),
+ ]
+ args += [
+ "--locales_listfile",
+ rebase_path(locales_listfile_output, root_build_dir),
+ ]
+ args += [
+ "--use_gcd",
+ "$remoting_use_gcd",
+ ]
+ }
+}
diff --git a/chromium/remoting/webapp/files.gni b/chromium/remoting/webapp/files.gni
new file mode 100644
index 00000000000..abb6b280a8f
--- /dev/null
+++ b/chromium/remoting/webapp/files.gni
@@ -0,0 +1,572 @@
+# Copyright 2015 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.
+
+# `7MM"""Mq. `7MM
+# MM `MM. MM
+# MM ,M9 .gP"Ya ,6"Yb. ,M""bMM `7MMpMMMb.pMMMb. .gP"Ya
+# MMmmdM9 ,M' Yb 8) MM ,AP MM MM MM MM ,M' Yb
+# MM YM. 8M"""""" ,pm9MM 8MI MM MM MM MM 8M""""""
+# MM `Mb.YM. , 8M MM `Mb MM MM MM MM YM. ,
+# .JMML. .JMM.`Mbmmd' `Moo9^Yo.`Wbmd"MML..JMML JMML JMML.`Mbmmd'
+#
+# Please keep this file in sync with remoting/remoting_webapp_files.gypi .
+
+# JSCompiler externs.
+remoting_webapp_js_externs_files = [ "externs/qunit.js" ]
+
+# Jscompile proto files.
+# These provide type information for jscompile.
+remoting_webapp_js_proto_files = [
+ "js_proto/chrome_proto.js",
+ "js_proto/dom_proto.js",
+ "js_proto/remoting_proto.js",
+]
+
+#
+# Webapp browsertest JavaScript files.
+#
+
+# Browser test files.
+remoting_webapp_browsertest_js_files = [
+ "browser_test/browser_test.js",
+ "browser_test/bump_scroll_browser_test.js",
+ "browser_test/cancel_pin_browser_test.js",
+ "browser_test/invalid_pin_browser_test.js",
+ "browser_test/it2me_browser_test.js",
+ "browser_test/me2me_browser_test.js",
+ "browser_test/scrollbar_browser_test.js",
+ "browser_test/timeout_waiter.js",
+ "browser_test/unauthenticated_browser_test.js",
+ "browser_test/update_pin_browser_test.js",
+]
+
+# Browser test files.
+remoting_webapp_browsertest_js_mock_files = [
+ "crd/js/mock_client_plugin.js",
+ "crd/js/mock_host_list_api.js",
+ "crd/js/mock_identity.js",
+ "crd/js/mock_oauth2_api.js",
+ "crd/js/mock_signal_strategy.js",
+]
+remoting_webapp_browsertest_js_proto_files = [
+ "js_proto/sinon_proto.js",
+ "js_proto/test_proto.js",
+ ] + remoting_webapp_js_proto_files
+
+remoting_webapp_browsertest_all_js_files =
+ remoting_webapp_browsertest_js_files +
+ remoting_webapp_browsertest_js_mock_files
+
+remoting_webapp_browsertest_main_html_extra_files =
+ remoting_webapp_browsertest_all_js_files +
+ [ "//third_party/sinonjs/src/sinon.js" ]
+
+#
+# Webapp unittest JavaScript files.
+#
+
+# These product files are excluded from our JavaScript unittest
+remoting_webapp_unittests_exclude_js_files = [
+ # background.js is where the onLoad handler is defined, which
+ # makes it the entry point of the background page.
+ "crd/js/background.js",
+]
+
+# The unit test cases for the webapp
+remoting_webapp_unittests_js_files = [
+ "base/js/base_unittest.js",
+ "base/js/base_event_hook_unittest.js",
+ "base/js/base_inherits_unittest.js",
+ "base/js/callstack_unittest.js",
+ "base/js/client_session_unittest.js",
+ "base/js/client_session_factory_unittest.js",
+ "base/js/console_wrapper_unittest.js",
+ "base/js/dns_blackhole_checker_unittest.js",
+ "base/js/error_unittest.js",
+ "base/js/fallback_signal_strategy_unittest.js",
+ "base/js/host_options_unittest.js",
+ "base/js/identity_unittest.js",
+ "base/js/ipc_unittest.js",
+ "base/js/l10n_unittest.js",
+ "base/js/network_connectivity_detector_unittest.js",
+ "base/js/platform_unittest.js",
+ "base/js/protocol_extension_manager_unittest.js",
+ "base/js/session_logger_unittest.js",
+ "base/js/telemetry_event_writer_unittest.js",
+ "base/js/typecheck_unittest.js",
+ "base/js/viewport_unittest.js",
+ "base/js/window_shape_unittest.js",
+ "base/js/window_message_dispatcher_unittest.js",
+ "base/js/xhr_event_writer_unittest.js",
+ "base/js/xhr_unittest.js",
+ "base/js/xmpp_connection_unittest.js",
+ "base/js/xmpp_error_cache_unittest.js",
+ "base/js/xmpp_login_handler_unittest.js",
+ "base/js/xmpp_stream_parser_unittest.js",
+ "crd/js/apps_v2_migration_unittest.js",
+ "crd/js/combined_host_list_api_unittest.js",
+ "crd/js/gcd_client_unittest.js",
+ "crd/js/gcd_client_with_mock_xhr_unittest.js",
+ "crd/js/gnubby_auth_handler_unittest.js",
+ "crd/js/host_controller_unittest.js",
+ "crd/js/host_daemon_facade_unittest.js",
+ "crd/js/host_table_entry_unittest.js",
+ "crd/js/legacy_host_list_api_unittest.js",
+ "crd/js/menu_button_unittest.js",
+ "crd/js/mock_xhr_unittest.js",
+]
+remoting_webapp_unittests_js_mock_files = [
+ "crd/js/mock_client_plugin.js",
+ "crd/js/mock_host_daemon_facade.js",
+ "crd/js/mock_host_list_api.js",
+ "crd/js/mock_identity.js",
+ "crd/js/mock_signal_strategy.js",
+ "js_proto/chrome_mocks.js",
+ "unittests/sinon_helpers.js",
+ "crd/js/mock_xhr.js",
+]
+
+# Prototypes for objects that are not mocked.
+remoting_webapp_unittests_js_proto_files = [
+ "js_proto/chrome_proto.js",
+ "js_proto/dom_proto.js",
+ "js_proto/remoting_proto.js",
+ "js_proto/sinon_proto.js",
+]
+remoting_webapp_unittests_all_js_files =
+ remoting_webapp_unittests_js_files +
+ remoting_webapp_unittests_js_mock_files + [ "unittests/qunit_callbacks.js" ]
+
+# All the files needed to run the unittests.
+remoting_webapp_unittests_all_files =
+ [ "crd/html/menu_button.css" ] + remoting_webapp_unittests_all_js_files
+remoting_webapp_unittests_template_main = "crd/html/template_unittests.html"
+
+#
+# Shared webapp JavaScript file groups.
+#
+
+# Auth (Google account) JavaScript files.
+remoting_webapp_shared_js_auth_google_files = [
+ "base/js/auth_init.js",
+ "base/js/identity.js",
+ "base/js/oauth2.js",
+ "base/js/oauth2_api.js",
+ "base/js/oauth2_api_impl.js",
+]
+
+# Client JavaScript files.
+remoting_webapp_shared_js_client_files = [
+ "base/js/activity.js",
+ "base/js/client_plugin.js",
+ "base/js/client_plugin_host_desktop_impl.js",
+ "base/js/client_plugin_impl.js",
+ "base/js/client_session.js",
+ "base/js/client_session_factory.js",
+ "base/js/clipboard.js",
+ "base/js/connected_view.js",
+ "base/js/connection_info.js",
+ "base/js/credentials_provider.js",
+ "base/js/experiments.js",
+ "base/js/host_desktop.js",
+ "base/js/telemetry_event_writer.js",
+ "base/js/xmpp_error_cache.js",
+]
+
+# Remoting core JavaScript files.
+remoting_webapp_shared_js_core_files = [
+ "base/js/application.js",
+ "base/js/base.js",
+ "base/js/callstack.js",
+ "base/js/chromoting_event.js",
+ "base/js/console_wrapper.js",
+ "base/js/ipc.js",
+ "base/js/modal_dialogs.js",
+ "base/js/platform.js",
+ "base/js/protocol_extension_manager.js",
+ "base/js/protocol_extension.js",
+ "base/js/error.js",
+ "base/js/network_connectivity_detector.js",
+ "base/js/plugin_settings.js",
+ "base/js/suspend_detector.js",
+ "base/js/typecheck.js",
+ "base/js/window_message_dispatcher.js",
+ "base/js/xhr.js",
+ "base/js/xhr_event_writer.js",
+]
+
+# Host JavaScript files.
+remoting_webapp_shared_js_host_files = [
+ "base/js/host.js",
+ "base/js/host_options.js",
+]
+
+# Logging and stats JavaScript files.
+remoting_webapp_shared_js_logging_files = [
+ "base/js/format_iq.js",
+ "base/js/session_logger.js",
+ "base/js/stats_accumulator.js",
+]
+
+# Remoting signaling files.
+remoting_webapp_shared_js_signaling_files = [
+ "base/js/dns_blackhole_checker.js",
+ "base/js/fallback_signal_strategy.js",
+ "base/js/signal_strategy.js",
+ "base/js/tcp_socket.js",
+ "base/js/wcs_adapter.js",
+ "base/js/wcs_sandbox_container.js",
+ "base/js/xmpp_connection.js",
+ "base/js/xmpp_login_handler.js",
+ "base/js/xmpp_stream_parser.js",
+]
+
+# UI JavaScript files.
+remoting_webapp_shared_js_ui_files = [
+ "base/js/connection_dropped_dialog.js",
+ "base/js/connection_stats.js",
+ "base/js/l10n.js",
+ "base/js/ui_mode.js",
+ "base/js/viewport.js",
+ "base/js/window_shape.js",
+]
+
+#
+# DesktopRemoting webapp JavaScript file groups.
+#
+
+# Auth (apps v1) JavaScript files.
+# These files aren"t included directly from main.html. They are
+# referenced from the manifest.json file (appsv1 only).
+remoting_webapp_js_auth_v1_files = [
+ "crd/js/cs_third_party_auth_trampoline.js", # client to host
+ "crd/js/cs_oauth2_trampoline.js", # Google account
+]
+
+# Auth (client to host) JavaScript files.
+remoting_webapp_js_auth_client2host_files = [
+ "crd/js/third_party_host_permissions.js",
+ "crd/js/third_party_token_fetcher.js",
+]
+
+# Client JavaScript files.
+remoting_webapp_js_client_files = [
+ "crd/js/apps_v2_migration.js",
+ "crd/js/event_handlers.js",
+ "crd/js/gcd_client.js",
+]
+
+# Gnubby authentication JavaScript files.
+remoting_webapp_js_gnubby_auth_files = [ "crd/js/gnubby_auth_handler.js" ]
+
+# Files for controlling the local machine as a host.
+# Includes both it2me and me2me files.
+remoting_webapp_js_host_control_files = [
+ "crd/js/host_controller.js",
+ "crd/js/host_daemon_facade.js",
+ "crd/js/host_screen.js",
+ "crd/js/host_session.js",
+ "crd/js/host_setup_dialog.js",
+ "crd/js/host_install_dialog.js",
+ "crd/js/host_installer.js",
+ "crd/js/it2me_host_facade.js",
+ "crd/js/native_message_host_log_message_handler.js",
+ "crd/js/paired_client_manager.js",
+]
+
+# Files for controlling the local it2me host.
+# Included by public_session.html.
+remoting_webapp_js_it2me_host_control_files = [
+ "crd/js/host_screen.js",
+ "crd/js/host_session.js",
+ "crd/js/host_install_dialog.js",
+ "crd/js/host_installer.js",
+ "crd/js/it2me_host_facade.js",
+ "crd/js/native_message_host_log_message_handler.js",
+]
+
+# Files for displaying (in the client) info about available hosts.
+remoting_webapp_js_host_display_files = [
+ "crd/js/host_list.js",
+ "crd/js/host_list_api.js",
+ "crd/js/host_table_entry.js",
+ "crd/js/local_host_section.js",
+
+ # Must come after host_list_api.js because of an issue with
+ # JSCompiler. If an implementation of an interface occurs in a
+ # file processed before the interface itself, the @override tag
+ # doesn't always work correctly.
+ "crd/js/combined_host_list_api.js",
+ "crd/js/gcd_host_list_api.js",
+ "crd/js/legacy_host_list_api.js",
+]
+
+# The CRD-specific JavaScript files required by main.html.
+remoting_webapp_crd_js_ui_files = [
+ "crd/js/bump_scroller.js",
+ "crd/js/butter_bar.js",
+ "crd/js/crd_auth_dialog.js",
+ "crd/js/crd_event_handlers.js",
+ "crd/js/crd_experimental.js",
+ "crd/js/desktop_connected_view.js",
+ "crd/js/desktop_remoting.js",
+ "crd/js/desktop_remoting_activity.js",
+ "crd/js/desktop_viewport.js",
+ "crd/js/feedback.js",
+ "crd/js/fullscreen.js",
+ "crd/js/fullscreen_v1.js",
+ "crd/js/fullscreen_v2.js",
+ "crd/js/it2me_activity.js",
+ "crd/js/me2me_activity.js",
+ "crd/js/menu_button.js",
+ "crd/js/options_menu.js",
+ "crd/js/toolbar.js",
+ "crd/js/window_frame.js",
+]
+
+#
+# DesktopRemoting main.html generation files.
+#
+
+remoting_webapp_template_main = "crd/html/template_main.html"
+
+# The shared JavaScript files required by main.html.
+remoting_webapp_shared_main_html_js_files =
+ # Include the core files first as it is required by the other files.
+ # Otherwise, Jscompile will complain.
+ remoting_webapp_shared_js_core_files +
+ remoting_webapp_shared_js_auth_google_files +
+ remoting_webapp_shared_js_client_files +
+ remoting_webapp_shared_js_host_files +
+ remoting_webapp_shared_js_logging_files +
+ remoting_webapp_shared_js_ui_files +
+ remoting_webapp_shared_js_signaling_files +
+ remoting_webapp_js_auth_client2host_files +
+ remoting_webapp_js_client_files + remoting_webapp_js_gnubby_auth_files +
+ remoting_webapp_js_host_control_files +
+ remoting_webapp_js_host_display_files
+
+# Uncomment this line to include browser test files in the web app
+# to expedite debugging or local development.
+#+ remoting_webapp_browsertest_all_js_files
+
+remoting_webapp_unittest_html_all_js_files =
+ remoting_webapp_shared_main_html_js_files + remoting_webapp_crd_js_ui_files
+
+# The CRD-specific JavaScript files required by main.html.
+remoting_webapp_crd_main_html_all_js_files =
+ remoting_webapp_shared_main_html_js_files +
+ remoting_webapp_crd_js_ui_files + [ "crd/js/crd_main.js" ]
+
+# These template files are used to construct main.html.
+remoting_webapp_template_files = [
+ "base/html/client_plugin.html",
+ "crd/html/butter_bar.html",
+ "crd/html/dialog_auth.html",
+ "crd/html/dialog_client_connect_failed.html",
+ "crd/html/dialog_client_connecting.html",
+ "crd/html/dialog_client_host_needs_upgrade.html",
+ "crd/html/dialog_client_pin_prompt.html",
+ "crd/html/dialog_client_session_finished.html",
+ "crd/html/dialog_client_third_party_auth.html",
+ "crd/html/dialog_client_unconnected.html",
+ "crd/html/dialog_confirm_host_delete.html",
+ "crd/html/dialog_connection_history.html",
+ "crd/html/dialog_host.html",
+ "crd/html/dialog_host_install.html",
+ "crd/html/dialog_host_setup.html",
+ "crd/html/dialog_manage_pairings.html",
+ "crd/html/dialog_token_refresh_failed.html",
+ "crd/html/toolbar.html",
+ "crd/html/ui_header.html",
+ "crd/html/ui_it2me.html",
+ "crd/html/ui_me2me.html",
+ "crd/html/window_frame.html",
+]
+
+#
+# DesktopRemoting public_session.html generation files.
+#
+remoting_webapp_template_public_session =
+ "crd/html/template_public_session.html"
+
+# The shared JavaScript files required by public_session.html.
+remoting_webapp_public_session_html_all_js_files =
+ # Include the core files first as it is required by the other files.
+ # Otherwise, Jscompile will complain.
+ remoting_webapp_shared_js_core_files +
+ remoting_webapp_shared_js_auth_google_files +
+ remoting_webapp_shared_js_client_files +
+ remoting_webapp_shared_js_host_files +
+ remoting_webapp_shared_js_logging_files +
+ remoting_webapp_shared_js_ui_files +
+ remoting_webapp_shared_js_signaling_files +
+ remoting_webapp_js_it2me_host_control_files +
+ [
+ "crd/js/crd_auth_dialog.js",
+ "crd/js/public_session_main.js",
+ ]
+
+# These template files are used to construct public_session.html.
+remoting_webapp_public_session_template_files = [ "crd/html/dialog_host.html" ]
+
+#
+# DesktopRemoting background.html generation files.
+#
+
+remoting_webapp_template_background = "crd/html/template_background.html"
+
+# These JS files are specific to the background page and are not part of
+# the main JS files.
+remoting_webapp_background_html_js_files = [
+ "crd/js/activation_handler.js",
+ "crd/js/app_launcher.js",
+ "crd/js/background.js",
+]
+
+# All the JavaScript files required by background.html.
+remoting_webapp_background_html_all_js_files =
+ remoting_webapp_background_html_js_files
+remoting_webapp_background_html_all_js_files += [
+ "base/js/base.js",
+ "base/js/chromoting_event.js",
+ "base/js/error.js",
+ "base/js/identity.js",
+ "base/js/ipc.js",
+ "base/js/l10n.js",
+ "base/js/oauth2.js",
+ "base/js/oauth2_api.js",
+ "base/js/oauth2_api_impl.js",
+ "base/js/platform.js",
+ "base/js/plugin_settings.js",
+ "base/js/telemetry_event_writer.js",
+ "base/js/typecheck.js",
+ "base/js/xhr.js",
+ "base/js/xhr_event_writer.js",
+]
+
+#
+# DesktopRemoting wcs_sandbox.html generation files.
+#
+
+remoting_webapp_template_wcs_sandbox = "base/html/template_wcs_sandbox.html"
+
+# These JS files are specific to the WCS sandbox page and are not part of
+# the main JS files.
+remoting_webapp_wcs_sandbox_html_js_files = [
+ "crd/js/wcs.js",
+ "crd/js/wcs_loader.js",
+ "crd/js/wcs_sandbox_content.js",
+ "crd/js/xhr_proxy.js",
+]
+
+# All the JavaScript files required by wcs_sandbox.html.
+remoting_webapp_wcs_sandbox_html_all_js_files =
+ remoting_webapp_wcs_sandbox_html_js_files
+remoting_webapp_wcs_sandbox_html_all_js_files += [
+ "base/js/chromoting_event.js",
+ "base/js/error.js",
+ "base/js/platform.js",
+ "base/js/plugin_settings.js",
+]
+
+#
+# DesktopRemoting message_window.html generation files.
+#
+
+remoting_webapp_template_message_window =
+ "base/html/template_message_window.html"
+
+# These JS files are specific to the message window page and are not part of
+# the main JS files.
+remoting_webapp_message_window_html_js_files = [ "base/js/message_window.js" ]
+
+# All the JavaScript files required by message_window.html.
+remoting_webapp_message_window_html_all_js_files =
+ remoting_webapp_message_window_html_js_files + [ "base/js/base.js" ]
+
+#
+# All the JavaScript files required by credits.html
+#
+
+remoting_webapp_credits_html_all_js_files = [ "base/js/credits_js.js" ]
+
+#
+# DesktopRemoting webapp JS and resource files.
+#
+
+# All the JavaScript files that are shared by webapps.
+remoting_webapp_shared_js_files = remoting_webapp_shared_main_html_js_files +
+ remoting_webapp_background_html_js_files +
+ remoting_webapp_credits_html_all_js_files +
+ remoting_webapp_message_window_html_js_files +
+ remoting_webapp_wcs_sandbox_html_js_files +
+ # JS files referenced in manifest.json.
+ remoting_webapp_js_auth_v1_files
+
+# All the JavaScript files required by DesktopRemoting.
+remoting_webapp_crd_js_files =
+ remoting_webapp_shared_js_files + remoting_webapp_crd_main_html_all_js_files
+
+remoting_webapp_info_files = [
+ "../resources/chromoting16.webp",
+ "../resources/chromoting48.webp",
+ "../resources/chromoting128.webp",
+]
+
+# All the resource files required by DesktopRemoting.
+remoting_webapp_resource_files = [
+ "../resources/disclosure_arrow_down.webp",
+ "../resources/disclosure_arrow_right.webp",
+ "../resources/drag.webp",
+ "../resources/host_setup_instructions.webp",
+ "../resources/icon_close.webp",
+ "../resources/icon_cross.webp",
+ "../resources/icon_disconnect.webp",
+ "../resources/icon_fullscreen.webp",
+ "../resources/icon_host.webp",
+ "../resources/icon_maximize_restore.webp",
+ "../resources/icon_minimize.webp",
+ "../resources/icon_options.webp",
+ "../resources/icon_pencil.webp",
+ "../resources/icon_warning.webp",
+ "../resources/infographic_my_computers.webp",
+ "../resources/infographic_remote_assistance.webp",
+ "../resources/plus.webp",
+ "../resources/reload.webp",
+ "../resources/tick.webp",
+ "base/html/connection_stats.css",
+ "base/html/credits_css.css",
+ "base/html/main.css",
+ "base/html/message_window.css",
+ "base/resources/open_sans.css",
+ "base/resources/open_sans.woff",
+ "base/resources/spinner.gif",
+ "crd/html/butter_bar.css",
+ "crd/html/crd_main.css",
+ "crd/html/toolbar.css",
+ "crd/html/menu_button.css",
+ "crd/html/public_session.css",
+ "crd/html/window_frame.css",
+ "crd/resources/scale-to-fit.webp",
+]
+
+remoting_webapp_crd_files =
+ remoting_webapp_info_files + remoting_webapp_crd_js_files +
+ remoting_webapp_resource_files +
+ remoting_webapp_public_session_html_all_js_files
+
+# Files that contain localizable strings.
+desktop_remoting_webapp_localizable_files =
+ [
+ "webapp/crd/manifest.json.jinja2",
+ remoting_webapp_template_background,
+ remoting_webapp_template_main,
+ remoting_webapp_template_message_window,
+ remoting_webapp_template_wcs_sandbox,
+ ] + remoting_webapp_template_files + remoting_webapp_crd_js_files
+
+webapp_js_files = remoting_webapp_unittest_html_all_js_files +
+ remoting_webapp_wcs_sandbox_html_js_files +
+ remoting_webapp_background_html_js_files