OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//testing/test.gni") | 6 import("//testing/test.gni") |
7 import("//chrome/test/base/js2gtest.gni") | 7 import("//chrome/test/base/js2gtest.gni") |
8 import("chromevox.gni") | 8 import("chromevox.gni") |
9 | 9 |
10 assert(is_chromeos) | 10 assert(is_chromeos) |
(...skipping 13 matching lines...) Expand all Loading... |
24 "//chrome/third_party/chromevox:chromevox_third_party_resources", | 24 "//chrome/third_party/chromevox:chromevox_third_party_resources", |
25 "//third_party/liblouis", | 25 "//third_party/liblouis", |
26 | 26 |
27 #<(DEPTH)/third_party/liblouis/liblouis_nacl.gyp:liblouis_nacl_wrapper_nacl'
# TODO(GYP) | 27 #<(DEPTH)/third_party/liblouis/liblouis_nacl.gyp:liblouis_nacl_wrapper_nacl'
# TODO(GYP) |
28 ":chromevox_copied_files", | 28 ":chromevox_copied_files", |
29 ":chromevox_manifest", | 29 ":chromevox_manifest", |
30 ":chromevox_guest_manifest", | 30 ":chromevox_guest_manifest", |
31 ] | 31 ] |
32 if (chromevox_compress_js) { | 32 if (chromevox_compress_js) { |
33 deps += [ | 33 deps += [ |
34 ":chromevox1_content_script", | 34 ":chromevox_content_script", |
35 ":chromevox1_kbexplorer_script", | 35 ":chromevox_kbexplorer_script", |
36 ":chromevox1_options_script", | 36 ":chromevox_options_script", |
37 ":chromevox2_background_script", | 37 ":chromevox_background_script", |
| 38 ":chromevox_panel_script", |
38 ] | 39 ] |
39 } else { | 40 } else { |
40 deps += [ ":chromevox_deps_js" ] | 41 deps += [ ":chromevox_deps_js" ] |
41 } | 42 } |
42 } | 43 } |
43 | 44 |
44 template("run_jsbundler") { | 45 template("run_jsbundler") { |
45 assert(defined(invoker.mode)) | 46 assert(defined(invoker.mode)) |
46 assert(defined(invoker.sources)) | 47 assert(defined(invoker.sources)) |
47 if (defined(invoker.modules)) { | 48 if (defined(invoker.modules)) { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 chromevox_vars_gypi_values = exec_script("//build/gypi_to_gn.py", | 127 chromevox_vars_gypi_values = exec_script("//build/gypi_to_gn.py", |
127 [ rebase_path("chromevox_vars.gypi") ], | 128 [ rebase_path("chromevox_vars.gypi") ], |
128 "scope", | 129 "scope", |
129 [ "chromevox_vars.gypi" ]) | 130 [ "chromevox_vars.gypi" ]) |
130 | 131 |
131 # Instead of setting up one copy target for each subdirectory, use a script | 132 # Instead of setting up one copy target for each subdirectory, use a script |
132 # to copy all files. | 133 # to copy all files. |
133 run_jsbundler("chromevox_copied_files") { | 134 run_jsbundler("chromevox_copied_files") { |
134 mode = "copy" | 135 mode = "copy" |
135 dest_dir = chromevox_out_dir | 136 dest_dir = chromevox_out_dir |
136 sources = chromevox_assets_gypi_values.chromevox_assets_chromevox | 137 sources = chromevox_assets_gypi_values.chromevox_assets_images |
137 sources += | 138 sources += |
138 chromevox_assets_gypi_values.chromevox_assets_chromevox_background_earcons | 139 chromevox_assets_gypi_values.chromevox_assets_chromevox_background_earcons |
139 sources += | 140 sources += |
140 chromevox_assets_gypi_values.chromevox_assets_chromevox_background_keymaps | 141 chromevox_assets_gypi_values.chromevox_assets_chromevox_background_keymaps |
141 sources += chromevox_assets_gypi_values.chromevox_assets_chromevox_background_
mathmaps_functions | 142 sources += chromevox_assets_gypi_values.chromevox_assets_chromevox_background_
mathmaps_functions |
142 sources += chromevox_assets_gypi_values.chromevox_assets_chromevox_background_
mathmaps_symbols | 143 sources += chromevox_assets_gypi_values.chromevox_assets_chromevox_background_
mathmaps_symbols |
143 sources += | 144 sources += |
144 chromevox_assets_gypi_values.chromevox_assets_cvox2_background_earcons | 145 chromevox_assets_gypi_values.chromevox_assets_cvox2_background_earcons |
145 sources += [ | 146 sources += [ |
146 "chromevox/background/background.html", | 147 "chromevox/background/background.html", |
147 "chromevox/background/kbexplorer.html", | 148 "chromevox/background/kbexplorer.html", |
148 "chromevox/background/options.html", | 149 "chromevox/background/options.html", |
149 "chromevox/injected/api.js", | 150 "chromevox/injected/api.js", |
150 "cvox2/background/background.html", | 151 "cvox2/background/background.html", |
| 152 "cvox2/background/panel.html", |
151 ] | 153 ] |
152 if (chromevox_compress_js) { | 154 if (chromevox_compress_js) { |
153 sources += [ "chromevox/injected/api_util.js" ] | 155 sources += [ "chromevox/injected/api_util.js" ] |
154 } else { | 156 } else { |
155 sources += chromevox_modules | 157 sources += chromevox_modules |
156 sources += [ | 158 sources += [ |
157 "closure/closure_preinit.js", | 159 "closure/closure_preinit.js", |
158 chromevox_vars_gypi_values.chromevox1_content_script_loader_file, | 160 chromevox_vars_gypi_values.chromevox_content_script_loader_file, |
159 chromevox_vars_gypi_values.chromevox1_kbexplorer_loader_file, | 161 chromevox_vars_gypi_values.chromevox_kbexplorer_loader_file, |
160 chromevox_vars_gypi_values.chromevox1_options_script_loader_file, | 162 chromevox_vars_gypi_values.chromevox_options_script_loader_file, |
161 chromevox_vars_gypi_values.chromevox2_background_script_loader_file, | 163 chromevox_vars_gypi_values.chromevox_background_script_loader_file, |
| 164 chromevox_vars_gypi_values.chromevox_panel_script_loader_file, |
162 ] | 165 ] |
163 } | 166 } |
164 if (!chromevox_compress_js) { | 167 if (!chromevox_compress_js) { |
165 sources += closure_library_modules | 168 sources += closure_library_modules |
166 } | 169 } |
167 rewrite_rules = [ | 170 rewrite_rules = [ |
168 rebase_path(".", root_build_dir) + ":", | 171 rebase_path(".", root_build_dir) + ":", |
169 rebase_path(closure_library_dir, root_build_dir) + ":closure", | 172 rebase_path(closure_library_dir, root_build_dir) + ":closure", |
170 ] | 173 ] |
171 } | 174 } |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 template("compress_js") { | 252 template("compress_js") { |
250 run_jsbundler(target_name) { | 253 run_jsbundler(target_name) { |
251 assert(defined(invoker.output_file)) | 254 assert(defined(invoker.output_file)) |
252 mode = "compressed_bundle" | 255 mode = "compressed_bundle" |
253 modules = chromevox_modules + closure_library_modules | 256 modules = chromevox_modules + closure_library_modules |
254 sources = invoker.sources | 257 sources = invoker.sources |
255 output_file = invoker.output_file | 258 output_file = invoker.output_file |
256 } | 259 } |
257 } | 260 } |
258 | 261 |
259 compress_js("chromevox1_content_script") { | 262 compress_js("chromevox_content_script") { |
260 sources = [ | 263 sources = [ |
261 chromevox_vars_gypi_values.chromevox1_content_script_loader_file, | 264 chromevox_vars_gypi_values.chromevox_content_script_loader_file, |
262 ] | 265 ] |
263 output_file = "$chromevox_out_dir/chromeVoxChromePageScript.js" | 266 output_file = "$chromevox_out_dir/chromeVoxChromePageScript.js" |
264 } | 267 } |
265 | 268 |
266 compress_js("chromevox1_kbexplorer_script") { | 269 compress_js("chromevox_kbexplorer_script") { |
267 sources = [ | 270 sources = [ |
268 chromevox_vars_gypi_values.chromevox1_kbexplorer_loader_file, | 271 chromevox_vars_gypi_values.chromevox_kbexplorer_loader_file, |
269 ] | 272 ] |
270 output_file = "$chromevox_out_dir/chromeVoxKbExplorerScript.js" | 273 output_file = "$chromevox_out_dir/chromeVoxKbExplorerScript.js" |
271 } | 274 } |
272 | 275 |
273 compress_js("chromevox1_options_script") { | 276 compress_js("chromevox_options_script") { |
274 sources = [ | 277 sources = [ |
275 chromevox_vars_gypi_values.chromevox1_options_script_loader_file, | 278 chromevox_vars_gypi_values.chromevox_options_script_loader_file, |
276 ] | 279 ] |
277 output_file = "$chromevox_out_dir/chromeVoxChromeOptionsScript.js" | 280 output_file = "$chromevox_out_dir/chromeVoxChromeOptionsScript.js" |
278 } | 281 } |
279 | 282 |
280 compress_js("chromevox2_background_script") { | 283 compress_js("chromevox_background_script") { |
281 sources = [ | 284 sources = [ |
282 chromevox_vars_gypi_values.chromevox2_background_script_loader_file, | 285 chromevox_vars_gypi_values.chromevox_background_script_loader_file, |
283 ] | 286 ] |
284 output_file = "$chromevox_out_dir/chromeVox2ChromeBackgroundScript.js" | 287 output_file = "$chromevox_out_dir/chromeVox2ChromeBackgroundScript.js" |
285 } | 288 } |
| 289 |
| 290 compress_js("chromevox_panel_script") { |
| 291 sources = [ |
| 292 chromevox_vars_gypi_values.chromevox_panel_script_loader_file, |
| 293 ] |
| 294 output_file = "$chromevox_out_dir/chromeVoxPanelScript.js" |
| 295 } |
286 } else { | 296 } else { |
287 generate_deps_js("chromevox_deps_js") { | 297 generate_deps_js("chromevox_deps_js") { |
288 sources = chromevox_modules + closure_library_modules | 298 sources = chromevox_modules + closure_library_modules |
289 output_file = "$chromevox_out_dir/deps.js" | 299 output_file = "$chromevox_out_dir/deps.js" |
290 rewrite_rules = [ | 300 rewrite_rules = [ |
291 rebase_path(".", root_build_dir) + ":..", | 301 rebase_path(".", root_build_dir) + ":..", |
292 rebase_path(closure_library_dir, root_build_dir) + ":../closure", | 302 rebase_path(closure_library_dir, root_build_dir) + ":../closure", |
293 ] | 303 ] |
294 } | 304 } |
295 } | 305 } |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 } | 391 } |
382 | 392 |
383 js2gtest("chromevox_extjs_tests") { | 393 js2gtest("chromevox_extjs_tests") { |
384 test_type = "extension" | 394 test_type = "extension" |
385 sources = chromevox_tests_gypi_values.chromevox_tests_extjs_sources | 395 sources = chromevox_tests_gypi_values.chromevox_tests_extjs_sources |
386 sources -= [ "braille/liblouis_test.extjs" ] # TODO(GYP) | 396 sources -= [ "braille/liblouis_test.extjs" ] # TODO(GYP) |
387 gen_include_files = | 397 gen_include_files = |
388 chromevox_tests_gypi_values.chromevox_tests_ext_gen_include_sources | 398 chromevox_tests_gypi_values.chromevox_tests_ext_gen_include_sources |
389 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] | 399 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] |
390 } | 400 } |
OLD | NEW |