OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
| 5 # Keep in sync with 'remoting_webapp_html' target in |
| 6 # remoting/remoting_client.gypi. |
| 7 |
| 8 import("//remoting/webapp/files.gni") |
| 9 |
5 action("html") { | 10 action("html") { |
6 script = "build-html.py" | 11 script = "build-html.py" |
7 | 12 |
8 remoting_webapp_template_main = "html/template_main.html" | |
9 remoting_webapp_template_files = [ | |
10 "html/butterbar.html", | |
11 "html/client_plugin.html", | |
12 "html/dialog_auth.html", | |
13 "html/dialog_client_connect_failed.html", | |
14 "html/dialog_client_connecting.html", | |
15 "html/dialog_client_host_needs_upgrade.html", | |
16 "html/dialog_client_pin_prompt.html", | |
17 "html/dialog_client_session_finished.html", | |
18 "html/dialog_client_third_party_auth.html", | |
19 "html/dialog_client_unconnected.html", | |
20 "html/dialog_confirm_host_delete.html", | |
21 "html/dialog_connection_history.html", | |
22 "html/dialog_host.html", | |
23 "html/dialog_host_install.html", | |
24 "html/dialog_host_setup.html", | |
25 "html/dialog_manage_pairings.html", | |
26 "html/dialog_token_refresh_failed.html", | |
27 "html/toolbar.html", | |
28 "html/ui_header.html", | |
29 "html/ui_it2me.html", | |
30 "html/ui_me2me.html", | |
31 "html/window_frame.html", | |
32 ] | |
33 | |
34 # Remoting core JavaScript files. | |
35 remoting_webapp_js_core_files = [ | |
36 "base.js", | |
37 "error.js", | |
38 "event_handlers.js", | |
39 "plugin_settings.js", | |
40 | |
41 # TODO(garykac) Split out UI client stuff from remoting.js. | |
42 "remoting.js", | |
43 "typecheck.js", | |
44 "xhr.js", | |
45 ] | |
46 | |
47 # Auth (client to host) JavaScript files. | |
48 remoting_webapp_js_auth_client2host_files = [ | |
49 "third_party_host_permissions.js", | |
50 "third_party_token_fetcher.js", | |
51 ] | |
52 | |
53 # Auth (Google account) JavaScript files. | |
54 remoting_webapp_js_auth_google_files = [ | |
55 "identity.js", | |
56 "oauth2.js", | |
57 "oauth2_api.js", | |
58 ] | |
59 | |
60 # Client JavaScript files. | |
61 remoting_webapp_js_client_files = [ | |
62 "client_plugin.js", | |
63 | |
64 # TODO(garykac) For client_screen: | |
65 # * Split out pin/access code stuff into separate file. | |
66 # * Move client logic into session_connector | |
67 "client_screen.js", | |
68 "client_session.js", | |
69 "clipboard.js", | |
70 "hangout_session.js", | |
71 "session_connector.js", | |
72 "smart_reconnector.js", | |
73 "video_frame_recorder.js", | |
74 ] | |
75 | |
76 # gnubby authentication JavaScript files. | |
77 remoting_webapp_js_gnubby_auth_files = [ "gnubby_auth_handler.js" ] | |
78 | |
79 # cast extension handler JavaScript files. | |
80 remoting_webapp_js_cast_extension_files = [ "cast_extension_handler.js" ] | |
81 | |
82 # Host JavaScript files. | |
83 # Includes both it2me and me2me files. | |
84 remoting_webapp_js_host_files = [ | |
85 "host_controller.js", | |
86 "host_daemon_facade.js", | |
87 "it2me_host_facade.js", | |
88 "host_session.js", | |
89 ] | |
90 | |
91 # Logging and stats JavaScript files. | |
92 remoting_webapp_js_logging_files = [ | |
93 "format_iq.js", | |
94 "log_to_server.js", | |
95 "server_log_entry.js", | |
96 "stats_accumulator.js", | |
97 ] | |
98 | |
99 # UI JavaScript files. | |
100 remoting_webapp_js_ui_files = [ | |
101 "butter_bar.js", | |
102 "connection_stats.js", | |
103 "feedback.js", | |
104 "fullscreen.js", | |
105 "fullscreen_v1.js", | |
106 "fullscreen_v2.js", | |
107 "l10n.js", | |
108 "menu_button.js", | |
109 "options_menu.js", | |
110 "ui_mode.js", | |
111 "toolbar.js", | |
112 "window_frame.js", | |
113 ] | |
114 | |
115 # UI files for controlling the local machine as a host. | |
116 remoting_webapp_js_ui_host_control_files = [ | |
117 "host_screen.js", | |
118 "host_setup_dialog.js", | |
119 "host_install_dialog.js", | |
120 "host_installer.js", | |
121 "paired_client_manager.js", | |
122 ] | |
123 | |
124 # UI files for displaying (in the client) info about available hosts. | |
125 remoting_webapp_js_ui_host_display_files = [ | |
126 "host.js", | |
127 "host_list.js", | |
128 "host_settings.js", | |
129 "host_table_entry.js", | |
130 ] | |
131 | |
132 # Remoting WCS container JavaScript files. | |
133 remoting_webapp_js_wcs_container_files = [ "wcs_sandbox_container.js" ] | |
134 | |
135 # Browser test JavaScript files (uncomment if used below). | |
136 #remoting_webapp_js_browser_test_files = [ | |
137 # "browser_test/browser_test.js", | |
138 # "browser_test/bump_scroll_browser_test.js", | |
139 # "browser_test/cancel_pin_browser_test.js", | |
140 # "browser_test/invalid_pin_browser_test.js", | |
141 # "browser_test/update_pin_browser_test.js", | |
142 #] | |
143 | |
144 # The JavaScript files required by main.html. | |
145 remoting_webapp_main_html_js_files = | |
146 # Include the core files first as it is required by the other files. | |
147 # Otherwise, Jscompile will complain. | |
148 remoting_webapp_js_core_files + | |
149 remoting_webapp_js_auth_client2host_files + | |
150 remoting_webapp_js_auth_google_files + remoting_webapp_js_client_files + | |
151 remoting_webapp_js_gnubby_auth_files + | |
152 remoting_webapp_js_cast_extension_files + remoting_webapp_js_host_files + | |
153 remoting_webapp_js_logging_files + remoting_webapp_js_ui_files + | |
154 remoting_webapp_js_ui_host_control_files + | |
155 remoting_webapp_js_ui_host_display_files + | |
156 remoting_webapp_js_wcs_container_files | |
157 | |
158 # Uncomment this line to include browser test files in the web app | |
159 # to expedite debugging or local development. | |
160 #+ remoting_webapp_js_browser_test_files | |
161 | |
162 inputs = [ remoting_webapp_template_main ] + remoting_webapp_template_files + | 13 inputs = [ remoting_webapp_template_main ] + remoting_webapp_template_files + |
163 remoting_webapp_main_html_js_files | 14 remoting_webapp_crd_main_html_all_js_files |
164 | 15 |
165 outputs = [ | 16 outputs = [ |
166 "$root_gen_dir/main.html", | 17 "$target_gen_dir/main.html", |
167 ] | 18 ] |
168 | 19 |
169 # Template files are relative to this directory. This passes some template | 20 # Template files are relative to this directory. This passes some template |
170 # files to the script, and the script reads templates from the files on disk. | 21 # files to the script, and the script reads templates from the files on disk. |
171 # They all have to be relative to the same directory. The GYP build made all | 22 # They all have to be relative to the same directory. The GYP build made all |
172 # of these relative to the remoting directory, so this does the same. | 23 # of these relative to the remoting directory, so this does the same. |
173 template_rel_dir = "//remoting" | 24 template_rel_dir = "//remoting" |
174 | 25 |
175 # TODO(brettw) It's very bad to put this file named "main" in the root | |
176 # generated file directory. | |
177 args = [ | 26 args = [ |
178 rebase_path("$root_gen_dir/main.html", template_rel_dir), | 27 rebase_path("$target_gen_dir/main.html", root_build_dir), |
179 rebase_path(remoting_webapp_template_main, template_rel_dir), | 28 rebase_path(remoting_webapp_template_main, root_build_dir), |
180 ] | 29 ] |
181 args += [ "--template" ] + | |
182 rebase_path(remoting_webapp_template_files, template_rel_dir) | |
183 args += [ "--js" ] + | |
184 rebase_path(remoting_webapp_main_html_js_files, template_rel_dir) | |
185 args += [ | 30 args += [ |
186 "--dir-for-templates", | 31 "--template-dir", |
187 rebase_path(template_rel_dir, root_build_dir), | 32 rebase_path(template_rel_dir, root_build_dir), |
188 ] | 33 ] |
| 34 args += [ "--templates" ] + |
| 35 rebase_path(remoting_webapp_template_files, template_rel_dir) |
| 36 args += [ "--js" ] + rebase_path(remoting_webapp_crd_main_html_all_js_files, |
| 37 template_rel_dir) |
189 } | 38 } |
190 # TODO(GYP) wcs_sandbox.html | 39 # TODO(GYP) wcs_sandbox.html, background.html, message_window.html |
OLD | NEW |