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

Unified Diff: Source/bindings/scripts/scripts.gni

Issue 1248043003: Initial patch for the web modules layered platform proposal. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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: Source/bindings/scripts/scripts.gni
diff --git a/Source/bindings/scripts/scripts.gni b/Source/bindings/scripts/scripts.gni
index ab5b6127c7ca0a213735cd7c1e460f79332be3d6..34c4b322501593f81b76c0db3d48db6d7170e8a6 100644
--- a/Source/bindings/scripts/scripts.gni
+++ b/Source/bindings/scripts/scripts.gni
@@ -118,6 +118,8 @@ template("generate_event_interfaces") {
# output_dir = string containing the directory to put the output files.
# output_name_suffix = a suffix after the basename of the output file names.
# target_component = component to generate code for.
+# is_web_modules = whether to generate C++ bindings for webmodules
+# or JS bindings for the web.
template("idl_compiler") {
output_dir = invoker.output_dir
output_name_suffix = invoker.output_name_suffix
@@ -152,10 +154,18 @@ template("idl_compiler") {
inputs += all_dependency_idl_files
sources = invoker.sources
- outputs = [
- "$output_dir/V8{{source_name_part}}${output_name_suffix}.cpp",
- "$output_dir/V8{{source_name_part}}${output_name_suffix}.h",
- ]
+
+ if (invoker.is_web_modules) {
+ outputs = [
+ "$output_dir/webmodules/WebModule{{source_name_part}}${output_name_suffix}.cpp",
+ "$output_dir/webmodules/WebModule{{source_name_part}}${output_name_suffix}.h",
+ ]
+ } else {
+ outputs = [
+ "$output_dir/v8/V8{{source_name_part}}${output_name_suffix}.cpp",
+ "$output_dir/v8/V8{{source_name_part}}${output_name_suffix}.h",
+ ]
+ }
args = [
"--cache-dir",
@@ -167,9 +177,13 @@ template("idl_compiler") {
"--write-file-only-if-changed=1", # Always true for Ninja.
"--target-component",
invoker.target_component,
- "{{source}}",
]
+ if (invoker.is_web_modules) {
+ args += [ "--web-modules" ]
+ }
+ args += [ "{{source}}" ]
+
public_deps = [
"//third_party/WebKit/Source/bindings/core:core_global_constructors_idls",
# FIXME: should be interfaces_info_core (w/o modules)

Powered by Google App Engine
This is Rietveld 408576698