| OLD | NEW |
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 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("//chrome/browser/resources/chromeos/chromevox/run_jsbundler.gni") | 8 import("//chrome/browser/resources/chromeos/chromevox/run_jsbundler.gni") |
| 9 | 9 |
| 10 assert(is_chromeos) | 10 assert(is_chromeos) |
| 11 | 11 |
| 12 switch_access_dir = "$root_out_dir/resources/chromeos/switch_access" | 12 switch_access_dir = "$root_out_dir/resources/chromeos/switch_access" |
| 13 | 13 |
| 14 group("switch_access") { | 14 group("switch_access") { |
| 15 deps = [ | 15 deps = [ |
| 16 ":switch_access_copied_files", | 16 ":switch_access_copied_files", |
| 17 ":switch_access_guest_manifest", | 17 ":switch_access_guest_manifest", |
| 18 ":switch_access_manifest", | 18 ":switch_access_manifest", |
| 19 ] | 19 ] |
| 20 } | 20 } |
| 21 | 21 |
| 22 # Instead of setting up one copy target for each subdirectory, use a script | 22 # Instead of setting up one copy target for each subdirectory, use a script |
| 23 # to copy all files. | 23 # to copy all files. |
| 24 run_jsbundler("switch_access_copied_files") { | 24 run_jsbundler("switch_access_copied_files") { |
| 25 mode = "copy" | 25 mode = "copy" |
| 26 dest_dir = switch_access_dir | 26 dest_dir = switch_access_dir |
| 27 sources = [ | 27 sources = [ |
| 28 "auto_scan_manager.js", |
| 28 "background.js", | 29 "background.js", |
| 30 "keyboard_handler.js", |
| 29 "options.css", | 31 "options.css", |
| 30 "options.html", | 32 "options.html", |
| 31 "options.js", | 33 "options.js", |
| 32 "prefs.js", | 34 "prefs.js", |
| 33 "switch_access.js", | 35 "switch_access.js", |
| 36 "tree_walker.js", |
| 34 ] | 37 ] |
| 35 rewrite_rules = [ | 38 rewrite_rules = [ |
| 36 rebase_path(".", root_build_dir) + ":", | 39 rebase_path(".", root_build_dir) + ":", |
| 37 rebase_path(closure_library_dir, root_build_dir) + ":closure", | 40 rebase_path(closure_library_dir, root_build_dir) + ":closure", |
| 38 ] | 41 ] |
| 39 } | 42 } |
| 40 | 43 |
| 41 # TODO: refactor this into another file like generate_manifest.gni | 44 # TODO: refactor this into another file like generate_manifest.gni |
| 42 # to share with other extensions. | 45 # to share with other extensions. |
| 43 template("manifest") { | 46 template("manifest") { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 71 } | 74 } |
| 72 | 75 |
| 73 manifest("switch_access_manifest") { | 76 manifest("switch_access_manifest") { |
| 74 output_file = "$switch_access_dir/manifest.json" | 77 output_file = "$switch_access_dir/manifest.json" |
| 75 } | 78 } |
| 76 | 79 |
| 77 manifest("switch_access_guest_manifest") { | 80 manifest("switch_access_guest_manifest") { |
| 78 output_file = "$switch_access_dir/manifest_guest.json" | 81 output_file = "$switch_access_dir/manifest_guest.json" |
| 79 is_guest_manifest = true | 82 is_guest_manifest = true |
| 80 } | 83 } |
| OLD | NEW |