Commit 62ee8a9c authored by garykac's avatar garykac Committed by Commit bot

[Chromoting] Enable remoting webapp main.html GN build.

The previous remoting webapp GN build files were not enabled and at
least 6 months out of date. This cl fixes the problem by bringing
the build rules up to date and enables the webapp build.

It also starts to move all the remoting-specific build rules into
the remoting dir rather than having them in the main build.gn file.

BUG=

Review URL: https://codereview.chromium.org/1082083005

Cr-Commit-Position: refs/heads/master@{#325551}
parent 7d073dc7
...@@ -12,7 +12,6 @@ import("//build/config/crypto.gni") ...@@ -12,7 +12,6 @@ import("//build/config/crypto.gni")
import("//build/config/features.gni") import("//build/config/features.gni")
import("//build/config/ui.gni") import("//build/config/ui.gni")
import("//build/module_args/v8.gni") import("//build/module_args/v8.gni")
import("//remoting/remoting_host.gni")
if (is_android) { if (is_android) {
import("//build/config/android/config.gni") import("//build/config/android/config.gni")
...@@ -139,10 +138,6 @@ group("gn_all") { ...@@ -139,10 +138,6 @@ group("gn_all") {
deps += [ "//extensions/shell:app_shell_unittests" ] deps += [ "//extensions/shell:app_shell_unittests" ]
} }
if (enable_me2me_host) {
deps += [ "//remoting/host:remoting_me2me_host" ]
}
if (enable_media_router) { if (enable_media_router) {
deps += [ deps += [
"//chrome/browser/media/router/", "//chrome/browser/media/router/",
...@@ -150,14 +145,8 @@ group("gn_all") { ...@@ -150,14 +145,8 @@ group("gn_all") {
] ]
} }
if (enable_remoting_host) { if (enable_remoting) {
deps += [ deps += [ "//remoting:remoting_all" ]
"//remoting:remoting_unittests",
"//remoting:remoting_perftests",
"//remoting/host",
"//remoting/host:remoting_start_host",
"//remoting/host/it2me:remote_assistance_host",
]
} }
if (toolkit_views) { if (toolkit_views) {
......
...@@ -227,17 +227,7 @@ ...@@ -227,17 +227,7 @@
}], }],
['remoting==1', { ['remoting==1', {
'dependencies': [ 'dependencies': [
'../remoting/remoting.gyp:remoting_host', '../remoting/remoting_all.gyp:remoting_all',
'../remoting/remoting.gyp:remoting_it2me_native_messaging_host',
'../remoting/remoting.gyp:remoting_start_host',
'../remoting/remoting.gyp:remoting_native_messaging_manifests',
'../remoting/remoting.gyp:remoting_perftests',
'../remoting/remoting.gyp:remoting_unittests',
],
}],
['remoting==1 and disable_nacl==0 and disable_nacl_untrusted==0', {
'dependencies': [
'../remoting/remoting.gyp:remoting_key_tester',
], ],
}], }],
['remoting==1 and chromeos==0', { ['remoting==1 and chromeos==0', {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import("//build/config/features.gni") import("//build/config/features.gni")
import("//build/config/ui.gni") import("//build/config/ui.gni")
import("//remoting/remoting_version.gni") import("//remoting/remoting_version.gni")
import("//remoting/remoting_host.gni") import("//remoting/remoting_enable.gni")
import("//testing/test.gni") import("//testing/test.gni")
# Various remoting targets need this version definition. # Various remoting targets need this version definition.
...@@ -13,6 +13,63 @@ config("version") { ...@@ -13,6 +13,63 @@ config("version") {
defines = [ "VERSION=$version_full" ] defines = [ "VERSION=$version_full" ]
} }
group("remoting_all") {
testonly = true
deps = [
#"//remoting:remoting_browser_test_resources",
"//remoting:remoting_unittests",
#"//remoting:remoting_webapp",
"//remoting/webapp:html",
#"//remoting:remoting_webapp_unittests",
#"//app_remoting_test.gyp:ar_sample_test_driver",
#"//app_remoting_webapp.gyp:ar_sample_app",
]
if (is_win) {
deps += [
#"//remoting:remoting_breakpad_tester",
#"//remoting:remoting_console",
#"//remoting:remoting_desktop",
#"//remoting:remoting_host_installation",
]
}
if (is_android) {
deps += [
#"//remoting:remoting_apk",
#"//remoting:remoting_test_apk",
#"//remoting:remoting_unittests_apk",
]
}
if (enable_remoting_host) {
deps += [
"//remoting:remoting_perftests",
"//remoting/host",
"//remoting/host:remoting_start_host",
"//remoting/host/it2me:remote_assistance_host",
#"//remoting:remoting_it2me_native_messaging_host",
#"//remoting:remoting_native_messaging_manifests",
]
}
if (enable_me2me_host) {
deps += [
"//remoting/host:remoting_me2me_host",
#"//remoting/host:remoting_me2me_host_archive",
]
}
# TODO(GYP) Depends on crbug.com/471924 being fixed for PNaCl.
if (enable_nacl) {
deps += [ "//remoting:remoting_key_tester" ]
}
}
# GYP version: remoting/remoting_test.gypi:remoting_test_common # GYP version: remoting/remoting_test.gypi:remoting_test_common
source_set("test_support") { source_set("test_support") {
testonly = true testonly = true
......
...@@ -72,6 +72,12 @@ ...@@ -72,6 +72,12 @@
'../remoting/remoting.gyp:remoting_me2me_native_messaging_host', '../remoting/remoting.gyp:remoting_me2me_native_messaging_host',
], ],
}], }],
# TODO(GYP) Depends on crbug.com/471924 being fixed for PNaCl.
['disable_nacl==0 and disable_nacl_untrusted==0', {
'dependencies': [
'../remoting/remoting.gyp:remoting_key_tester',
],
}],
], ],
}, # end of target 'remoting_all' }, # end of target 'remoting_all'
......
# 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_mac) {
enable_remoting_host = true
enable_me2me_host = true
}
if (is_linux && !is_chromeos && use_x11) {
enable_remoting_host = true
enable_me2me_host = true
}
if (is_linux && is_chromeos) {
enable_remoting_host = true
}
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
# Keep in sync with remoting/remoting_enable.gni.
{ {
'variables': { 'variables': {
'enable_remoting_host%': 0, 'enable_remoting_host%': 0,
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
# Keep in sync with remoting/webapp/files.gni.
{ {
'variables': { 'variables': {
......
...@@ -2,168 +2,19 @@ ...@@ -2,168 +2,19 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
action("html") { # Keep in sync with 'remoting_webapp_html' target in
script = "build-html.py" # remoting/remoting_client.gypi.
remoting_webapp_template_main = "html/template_main.html"
remoting_webapp_template_files = [
"html/butterbar.html",
"html/client_plugin.html",
"html/dialog_auth.html",
"html/dialog_client_connect_failed.html",
"html/dialog_client_connecting.html",
"html/dialog_client_host_needs_upgrade.html",
"html/dialog_client_pin_prompt.html",
"html/dialog_client_session_finished.html",
"html/dialog_client_third_party_auth.html",
"html/dialog_client_unconnected.html",
"html/dialog_confirm_host_delete.html",
"html/dialog_connection_history.html",
"html/dialog_host.html",
"html/dialog_host_install.html",
"html/dialog_host_setup.html",
"html/dialog_manage_pairings.html",
"html/dialog_token_refresh_failed.html",
"html/toolbar.html",
"html/ui_header.html",
"html/ui_it2me.html",
"html/ui_me2me.html",
"html/window_frame.html",
]
# Remoting core JavaScript files.
remoting_webapp_js_core_files = [
"base.js",
"error.js",
"event_handlers.js",
"plugin_settings.js",
# TODO(garykac) Split out UI client stuff from remoting.js.
"remoting.js",
"typecheck.js",
"xhr.js",
]
# Auth (client to host) JavaScript files.
remoting_webapp_js_auth_client2host_files = [
"third_party_host_permissions.js",
"third_party_token_fetcher.js",
]
# Auth (Google account) JavaScript files.
remoting_webapp_js_auth_google_files = [
"identity.js",
"oauth2.js",
"oauth2_api.js",
]
# Client JavaScript files.
remoting_webapp_js_client_files = [
"client_plugin.js",
# TODO(garykac) For client_screen:
# * Split out pin/access code stuff into separate file.
# * Move client logic into session_connector
"client_screen.js",
"client_session.js",
"clipboard.js",
"hangout_session.js",
"session_connector.js",
"smart_reconnector.js",
"video_frame_recorder.js",
]
# gnubby authentication JavaScript files.
remoting_webapp_js_gnubby_auth_files = [ "gnubby_auth_handler.js" ]
# cast extension handler JavaScript files.
remoting_webapp_js_cast_extension_files = [ "cast_extension_handler.js" ]
# Host JavaScript files. import("//remoting/webapp/files.gni")
# Includes both it2me and me2me files.
remoting_webapp_js_host_files = [
"host_controller.js",
"host_daemon_facade.js",
"it2me_host_facade.js",
"host_session.js",
]
# Logging and stats JavaScript files.
remoting_webapp_js_logging_files = [
"format_iq.js",
"log_to_server.js",
"server_log_entry.js",
"stats_accumulator.js",
]
# UI JavaScript files.
remoting_webapp_js_ui_files = [
"butter_bar.js",
"connection_stats.js",
"feedback.js",
"fullscreen.js",
"fullscreen_v1.js",
"fullscreen_v2.js",
"l10n.js",
"menu_button.js",
"options_menu.js",
"ui_mode.js",
"toolbar.js",
"window_frame.js",
]
# UI files for controlling the local machine as a host.
remoting_webapp_js_ui_host_control_files = [
"host_screen.js",
"host_setup_dialog.js",
"host_install_dialog.js",
"host_installer.js",
"paired_client_manager.js",
]
# UI files for displaying (in the client) info about available hosts.
remoting_webapp_js_ui_host_display_files = [
"host.js",
"host_list.js",
"host_settings.js",
"host_table_entry.js",
]
# Remoting WCS container JavaScript files.
remoting_webapp_js_wcs_container_files = [ "wcs_sandbox_container.js" ]
# Browser test JavaScript files (uncomment if used below).
#remoting_webapp_js_browser_test_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/update_pin_browser_test.js",
#]
# The JavaScript files required by main.html.
remoting_webapp_main_html_js_files =
# Include the core files first as it is required by the other files.
# Otherwise, Jscompile will complain.
remoting_webapp_js_core_files +
remoting_webapp_js_auth_client2host_files +
remoting_webapp_js_auth_google_files + remoting_webapp_js_client_files +
remoting_webapp_js_gnubby_auth_files +
remoting_webapp_js_cast_extension_files + remoting_webapp_js_host_files +
remoting_webapp_js_logging_files + remoting_webapp_js_ui_files +
remoting_webapp_js_ui_host_control_files +
remoting_webapp_js_ui_host_display_files +
remoting_webapp_js_wcs_container_files
# Uncomment this line to include browser test files in the web app action("html") {
# to expedite debugging or local development. script = "build-html.py"
#+ remoting_webapp_js_browser_test_files
inputs = [ remoting_webapp_template_main ] + remoting_webapp_template_files + inputs = [ remoting_webapp_template_main ] + remoting_webapp_template_files +
remoting_webapp_main_html_js_files remoting_webapp_crd_main_html_all_js_files
outputs = [ outputs = [
"$root_gen_dir/main.html", "$target_gen_dir/main.html",
] ]
# Template files are relative to this directory. This passes some template # Template files are relative to this directory. This passes some template
...@@ -172,19 +23,17 @@ action("html") { ...@@ -172,19 +23,17 @@ action("html") {
# of these relative to the remoting directory, so this does the same. # of these relative to the remoting directory, so this does the same.
template_rel_dir = "//remoting" template_rel_dir = "//remoting"
# TODO(brettw) It's very bad to put this file named "main" in the root
# generated file directory.
args = [ args = [
rebase_path("$root_gen_dir/main.html", template_rel_dir), rebase_path("$target_gen_dir/main.html", root_build_dir),
rebase_path(remoting_webapp_template_main, template_rel_dir), rebase_path(remoting_webapp_template_main, root_build_dir),
] ]
args += [ "--template" ] +
rebase_path(remoting_webapp_template_files, template_rel_dir)
args += [ "--js" ] +
rebase_path(remoting_webapp_main_html_js_files, template_rel_dir)
args += [ args += [
"--dir-for-templates", "--template-dir",
rebase_path(template_rel_dir, root_build_dir), rebase_path(template_rel_dir, root_build_dir),
] ]
args += [ "--templates" ] +
rebase_path(remoting_webapp_template_files, template_rel_dir)
args += [ "--js" ] + rebase_path(remoting_webapp_crd_main_html_all_js_files,
template_rel_dir)
} }
# TODO(GYP) wcs_sandbox.html # TODO(GYP) wcs_sandbox.html, background.html, message_window.html
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment