| 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..ee722d03a9573a4db5f182cf57aa10fa14f3ed47 100644
|
| --- a/Source/bindings/scripts/code_generator_v8.py
|
| +++ b/Source/bindings/scripts/code_generator_v8.py
|
| @@ -75,6 +75,7 @@ from idl_types import IdlType
|
| import v8_callback_interface
|
| from v8_globals import includes, interfaces
|
| import v8_interface
|
| +import v8_private_script_interface
|
| import v8_types
|
| from v8_utilities import capitalize, cpp_name, conditional_string, v8_class_name
|
|
|
| @@ -130,6 +131,12 @@ class CodeGeneratorV8(object):
|
| header_template_filename = 'callback_interface.h'
|
| cpp_template_filename = 'callback_interface.cpp'
|
| generate_contents = v8_callback_interface.generate_callback_interface
|
| + # Currently private scripts don't have dependencies. Once private scripts have dependencies,
|
| + # we should add them to interface_info.
|
| + 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 +150,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:
|
| + 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)
|
|
|