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

Unified Diff: extensions/generated_extensions_api.gni

Issue 487533005: Add support for references in different paths in apis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « extensions/common/api/schemas.gypi ('k') | tools/json_schema_compiler/cc_generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/generated_extensions_api.gni
diff --git a/extensions/generated_extensions_api.gni b/extensions/generated_extensions_api.gni
index 98ddc774f78ab86cece0295bd59d910221fc6a51..0926d9402a61ab2bb36393c6d41b38c1df8a4f34 100644
--- a/extensions/generated_extensions_api.gni
+++ b/extensions/generated_extensions_api.gni
@@ -16,6 +16,12 @@
# namespace for each API. Use %(namespace)s to replace with the API
# namespace, like "toplevel::%(namespace)s_api".
#
+# schema_include_rules [optional]
+# A list of paths to include when searching for referenced objects,
+# with the namespace separated by a :.
+# Example:
+# [ '/foo/bar:Foo::Bar::%(namespace)s' ]
+#
# schemas [optional, default = false]
# Boolean indicating if the schema files should be generated.
#
@@ -54,6 +60,11 @@ template("generated_extensions_api") {
bundle_registration = defined(invoker.bundle_registration) &&
invoker.bundle_registration
+ schema_include_rules = ""
+ if (defined(invoker.schema_include_rules)) {
+ schema_include_rules = invoker.schema_include_rules
+ }
+
# Keep a copy of the target_name here since it will be trampled
# in nested targets.
target_visibility = ":$target_name"
@@ -96,7 +107,8 @@ template("generated_extensions_api") {
"--root=" + rebase_path("//", root_build_dir),
"--destdir=" + rebase_path(root_gen_dir, root_build_dir),
"--namespace=$root_namespace",
- "--generator=cpp" ]
+ "--generator=cpp",
+ "--include-rules=$schema_include_rules" ]
visibility = target_visibility
}
}
@@ -120,9 +132,9 @@ template("generated_extensions_api") {
"--destdir=" + rebase_path(root_gen_dir, root_build_dir),
"--namespace=$root_namespace",
"--generator=cpp-bundle-schema",
- ] +
- rebase_path(sources, root_build_dir) +
- rebase_path(uncompiled_sources, root_build_dir)
+ "--include-rules=$schema_include_rules" ]
+ + rebase_path(sources, root_build_dir)
+ + rebase_path(uncompiled_sources, root_build_dir)
}
}
@@ -151,9 +163,9 @@ template("generated_extensions_api") {
"--namespace=$root_namespace",
"--generator=cpp-bundle-registration",
"--impl-dir=" + rebase_path(impl_dir, "//"),
- ] +
- rebase_path(sources, root_build_dir) +
- rebase_path(uncompiled_sources, root_build_dir)
+ "--include-rules=$schema_include_rules" ]
+ + rebase_path(sources, root_build_dir)
+ + rebase_path(uncompiled_sources, root_build_dir)
}
}
« no previous file with comments | « extensions/common/api/schemas.gypi ('k') | tools/json_schema_compiler/cc_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698