| Index: third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py
|
| diff --git a/third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py b/third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py
|
| index 8fbf18af19b93d0494c6adb358c5160f60aa13be..0cd827bbdc62ec8fd97181b5d4dad0fa98dbab38 100644
|
| --- a/third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py
|
| +++ b/third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py
|
| @@ -35,6 +35,7 @@ Design doc: http://www.chromium.org/developers/design-documents/idl-compiler
|
|
|
| from idl_types import IdlTypeBase
|
| from v8_globals import includes
|
| +from v8_interface import constant_context
|
| import v8_types
|
| import v8_utilities
|
|
|
| @@ -50,6 +51,13 @@ CALLBACK_INTERFACE_CPP_INCLUDES = frozenset([
|
| 'platform/wtf/GetPtr.h',
|
| 'platform/wtf/RefPtr.h',
|
| ])
|
| +LEGACY_CALLBACK_INTERFACE_CPP_INCLUDES = frozenset([
|
| + 'bindings/core/v8/ScriptController.h',
|
| + 'bindings/core/v8/V8BindingForCore.h',
|
| + 'bindings/core/v8/V8DOMConfiguration.h',
|
| + 'core/dom/ExecutionContext.h',
|
| + 'platform/wtf/Assertions.h',
|
| +])
|
|
|
|
|
| def cpp_type(idl_type):
|
| @@ -82,6 +90,20 @@ def callback_interface_context(callback_interface, _):
|
| }
|
|
|
|
|
| +def legacy_callback_interface_context(callback_interface, _):
|
| + includes.clear()
|
| + includes.update(LEGACY_CALLBACK_INTERFACE_CPP_INCLUDES)
|
| + return {
|
| + # TODO(bashi): Fix crbug.com/630986, and add 'methods'.
|
| + 'constants': [constant_context(constant, callback_interface)
|
| + for constant in callback_interface.constants],
|
| + 'cpp_class': callback_interface.name,
|
| + 'header_includes': set(CALLBACK_INTERFACE_H_INCLUDES),
|
| + 'interface_name': callback_interface.name,
|
| + 'v8_class': v8_utilities.v8_class_name(callback_interface),
|
| + }
|
| +
|
| +
|
| def add_includes_for_operation(operation):
|
| operation.idl_type.add_includes_for_type()
|
| for argument in operation.arguments:
|
|
|