| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 select_to_speak_out_dir = "$root_out_dir/resources/chromeos/select_to_speak" | 12 select_to_speak_out_dir = "$root_out_dir/resources/chromeos/select_to_speak" |
| 13 | 13 |
| 14 group("select_to_speak") { | 14 group("select_to_speak") { |
| 15 deps = [ | 15 deps = [ |
| 16 ":select_to_speak_copied_files", | 16 ":select_to_speak_copied_files", |
| 17 ":select_to_speak_guest_manifest", | 17 ":select_to_speak_guest_manifest", |
| 18 ":select_to_speak_manifest", | 18 ":select_to_speak_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("select_to_speak_copied_files") { | 24 run_jsbundler("select_to_speak_copied_files") { |
| 25 mode = "copy" | 25 mode = "copy" |
| 26 dest_dir = select_to_speak_out_dir | 26 dest_dir = select_to_speak_out_dir |
| 27 sources = [ | 27 sources = [ |
| 28 "background.js", | 28 "select_to_speak.js", |
| 29 ] | 29 ] |
| 30 rewrite_rules = [ | 30 rewrite_rules = [ |
| 31 rebase_path(".", root_build_dir) + ":", | 31 rebase_path(".", root_build_dir) + ":", |
| 32 rebase_path(closure_library_dir, root_build_dir) + ":closure", | 32 rebase_path(closure_library_dir, root_build_dir) + ":closure", |
| 33 ] | 33 ] |
| 34 } | 34 } |
| 35 | 35 |
| 36 # TODO: refactor this into another file like generate_manifest.gni | 36 # TODO: refactor this into another file like generate_manifest.gni |
| 37 # to share with other extensions. | 37 # to share with other extensions. |
| 38 template("manifest") { | 38 template("manifest") { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 66 } | 66 } |
| 67 | 67 |
| 68 manifest("select_to_speak_manifest") { | 68 manifest("select_to_speak_manifest") { |
| 69 output_file = "$select_to_speak_out_dir/manifest.json" | 69 output_file = "$select_to_speak_out_dir/manifest.json" |
| 70 } | 70 } |
| 71 | 71 |
| 72 manifest("select_to_speak_guest_manifest") { | 72 manifest("select_to_speak_guest_manifest") { |
| 73 output_file = "$select_to_speak_out_dir/manifest_guest.json" | 73 output_file = "$select_to_speak_out_dir/manifest_guest.json" |
| 74 is_guest_manifest = true | 74 is_guest_manifest = true |
| 75 } | 75 } |
| OLD | NEW |