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

Unified Diff: Source/bindings/scripts/code_generator_v8.py

Issue 345893002: Implement an infrastructure of Blink-in-JS Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/code_generator_v8.py
diff --git a/Source/bindings/scripts/code_generator_v8.py b/Source/bindings/scripts/code_generator_v8.py
index 778a87ec79b9d11b1959bd6d4f80820616e90b29..257f9d0e3c10697b69ec0ada5f6c1d31b4fd635d 100644
--- a/Source/bindings/scripts/code_generator_v8.py
+++ b/Source/bindings/scripts/code_generator_v8.py
@@ -72,6 +72,7 @@ import jinja2
import idl_types
from idl_types import IdlType
+import v8_private_script_interface
Nils Barth (inactive) 2014/06/23 03:14:29 alpha
import v8_callback_interface
from v8_globals import includes, interfaces
import v8_interface
@@ -130,6 +131,10 @@ class CodeGeneratorV8(object):
header_template_filename = 'callback_interface.h'
cpp_template_filename = 'callback_interface.cpp'
generate_contents = v8_callback_interface.generate_callback_interface
+ elif 'PrivateScriptInterface' in interface.extended_attributes:
+ header_template_filename = 'private_script_interface.h'
+ cpp_template_filename = 'private_script_interface.cpp'
+ generate_contents = v8_private_script_interface.generate_private_script_interface
else:
header_template_filename = 'interface.h'
cpp_template_filename = 'interface.cpp'
@@ -143,7 +148,8 @@ class CodeGeneratorV8(object):
# Add includes for interface itself and any dependencies
interface_info = self.interfaces_info[interface_name]
- template_contents['header_includes'].add(interface_info['include_path'])
+ if 'PrivateScriptInterface' not in interface.extended_attributes:
Nils Barth (inactive) 2014/06/23 03:14:29 Longer-term we can have private scripts also passe
haraken 2014/06/23 06:01:46 Actually I'm not sure what kind of dependency we'l
Nils Barth (inactive) 2014/06/23 06:21:25 That's fine; just a heads-up. Might want to add a
haraken 2014/06/23 08:15:38 Done.
+ template_contents['header_includes'].add(interface_info['include_path'])
template_contents['header_includes'] = sorted(template_contents['header_includes'])
includes.update(interface_info.get('dependencies_include_paths', []))
template_contents['cpp_includes'] = sorted(includes)

Powered by Google App Engine
This is Rietveld 408576698