Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2112)

Unified Diff: chrome/browser/resources/chromeos/switch_access/BUILD.gn

Issue 2680383002: Created skeleton for switch access component extension. (Closed)
Patch Set: Fixing copyright year for new files Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/switch_access/BUILD.gn
diff --git a/chrome/browser/resources/chromeos/switch_access/BUILD.gn b/chrome/browser/resources/chromeos/switch_access/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..b40eaf9fa8e939c2be71559d3dbfe629c01f4b8b
--- /dev/null
+++ b/chrome/browser/resources/chromeos/switch_access/BUILD.gn
@@ -0,0 +1,75 @@
+# Copyright 2017 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)
+
+switch_access_dir = "$root_out_dir/resources/chromeos/switch_access"
+
+group("switch_access") {
+ deps = [
+ ":switch_access_copied_files",
+ ":switch_access_guest_manifest",
+ ":switch_access_manifest",
+ ]
+}
+
+# Instead of setting up one copy target for each subdirectory, use a script
+# to copy all files.
+run_jsbundler("switch_access_copied_files") {
+ mode = "copy"
+ dest_dir = switch_access_dir
+ sources = [
+ "switch_access.js",
+ ]
+ rewrite_rules = [
+ rebase_path(".", root_build_dir) + ":",
+ rebase_path(closure_library_dir, root_build_dir) + ":closure",
+ ]
+}
+
+# TODO: refactor this into another file like generate_manifest.gni
+# to share with other extensions.
+template("manifest") {
+ version_file = "//chrome/VERSION"
+ version_script = "//build/util/version.py"
+ template_file = "manifest.json.jinja2"
+ output_file = invoker.output_file
+ key =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evZss33prwKBgAQE7BydPbG7UgbX6UAtRRZ9PwGzRW8v8WWNZYRbsoeoBpbmClErYgDXD4ytY6UB9XVbUPJRxdWXp+6u5OiYWxrvb86AnnqiwIKgmgVOb/5kr7RCMBsd1hFQW6wqXkKwKbvrk4UiciTPVu4y+YVfxqhcnwflwfWofLjFaT8Q/2EbAoGANkdtr+5iRYhfr1BKmKwvRqDHtNtGGNlJZecCWAwC1p7C0I5FsyK3m9AyJlPcmxE2MSA/jv3qLWdG2JeH9ODcLuzy6C7hgB1X07H6lJBeANXd0Uz6ba96kdeZHGlzkY7xI0MbQl4kKkXiUvVijzgs8y5HfVi8SgHm7HxGCDASehcCgYEAnw1yu4eaWqsq7ECyjEBM7sQcMVGypiG3VupzLKA75iPkg/E+peUZyDRg7LPCiX/UcW22bliUw1ASRzY+thuVlGWC2CPah95Z4m+H4cJVSEEqKUbYRGfsDlDIJNxPihGvhoTniKZwvpUacbAhop7rbiAVGx+RJ+tFG8P56AbvBVE="
+ 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("switch_access_manifest") {
+ output_file = "$switch_access_dir/manifest.json"
+}
+
+manifest("switch_access_guest_manifest") {
+ output_file = "$switch_access_dir/manifest_guest.json"
+ is_guest_manifest = true
+}

Powered by Google App Engine
This is Rietveld 408576698