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

Unified Diff: third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py

Issue 2837923003: Make NodeFilter a legacy callback interface. (Closed)
Patch Set: templates.gni, etc. Created 3 years, 8 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: 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:
« no previous file with comments | « third_party/WebKit/Source/bindings/scripts/utilities.py ('k') | third_party/WebKit/Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698