Chromium Code Reviews| Index: chrome/browser/resources/chromeos/select_to_speak/BUILD.gn |
| diff --git a/chrome/browser/resources/chromeos/select_to_speak/BUILD.gn b/chrome/browser/resources/chromeos/select_to_speak/BUILD.gn |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f41842760da0668afbef1ade6fa52851268905a0 |
| --- /dev/null |
| +++ b/chrome/browser/resources/chromeos/select_to_speak/BUILD.gn |
| @@ -0,0 +1,73 @@ |
| +# Copyright 2016 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. |
| + |
| +import("//build/config/features.gni") |
| +import("//testing/test.gni") |
| +import("//chrome/test/base/js2gtest.gni") |
| +import("//chrome/browser/resources/chromeos/chromevox/run_jsbundler.gni") |
| + |
| +assert(is_chromeos) |
| + |
| +select_to_speak_out_dir = "$root_out_dir/resources/chromeos/select_to_speak" |
| + |
| +group("select_to_speak") { |
| + deps = [ |
| + ":select_to_speak_copied_files", |
| + ":select_to_speak_guest_manifest", |
| + ":select_to_speak_manifest", |
| + ] |
| +} |
| + |
| +# Instead of setting up one copy target for each subdirectory, use a script |
| +# to copy all files. |
| +run_jsbundler("select_to_speak_copied_files") { |
| + mode = "copy" |
| + dest_dir = select_to_speak_out_dir |
| + sources = [ |
| + "background.js", |
| + ] |
| + rewrite_rules = [ |
| + rebase_path(".", root_build_dir) + ":", |
| + rebase_path(closure_library_dir, root_build_dir) + ":closure", |
| + ] |
| +} |
| + |
| +template("manifest") { |
|
David Tseng
2016/09/16 21:16:02
Optional: would be great to share this in another
dmazzoni
2016/09/16 22:06:20
Added a TODO
|
| + version_file = "//chrome/VERSION" |
| + version_script = "//build/util/version.py" |
| + template_file = "manifest.json.jinja2" |
| + output_file = invoker.output_file |
| + key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAukZ6JJWr0jHmFTkn0pcigpjI+cP0FqTo8FRIcCwy2fPeM+Ymf+7C9MK642i+Nhdr2qSsRF26AMIKbBdSDUnh04bfg5J/rKa/VO88LvXENYQMGhTo1y9mVg2OsbQJtEL9aTLU2G0SoKcr3g/+lggBKR5ydW1Qa0WGGAM9XrLm8iu/wn2uF4mfcMii6KfyEsAwWalpr/Td5WbtIoNNDpNeKO4ZSZJis1n9PZXqaOKpW7PqFDpEHw2PnPATxkcqj/wIx+Shgada0fhrzMlhXLhhj7ThSSWbuTz5n5NebuQ49/Z2ATgpBCSzYBVXEXMDe6LBBtGiZ/QR9UkA8Lz8bP6xIQIDAQAB" |
| + action(target_name) { |
| + script = "//chrome/browser/resources/chromeos/chromevox/tools/generate_manifest.py" |
| + inputs = [ |
| + version_file, |
| + version_script, |
| + ] |
| + sources = [ |
| + template_file, |
| + ] |
| + outputs = [ |
| + output_file, |
| + ] |
| + args = [ |
| + "--key=$key", |
| + "--version_file=" + rebase_path(version_file, root_build_dir), |
| + "--output_manifest=" + rebase_path(output_file, root_build_dir), |
| + ] |
| + if (defined(invoker.is_guest_manifest) && invoker.is_guest_manifest) { |
| + args += [ "--is_guest_manifest=1" ] |
| + } |
| + args += rebase_path(sources, root_build_dir) |
| + } |
| +} |
| + |
| +manifest("select_to_speak_manifest") { |
| + output_file = "$select_to_speak_out_dir/manifest.json" |
| +} |
| + |
| +manifest("select_to_speak_guest_manifest") { |
| + output_file = "$select_to_speak_out_dir/manifest_guest.json" |
| + is_guest_manifest = true |
| +} |