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

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

Issue 2367543004: Extended implementation to use interface as arguments (Closed)
Patch Set: Addressed comments Created 4 years, 3 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_function.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py b/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py
index 4900abac48256e8271b05a03698b66df6eac8176..78ee37ff9f8373aa863ca1429ba339d639ed7f19 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py
@@ -27,9 +27,15 @@ def callback_function_context(callback_function):
includes.update(CALLBACK_FUNCTION_CPP_INCLUDES)
idl_type = callback_function.idl_type
idl_type_str = str(idl_type)
+ forward_declarations = []
+ for argument in callback_function.arguments:
+ if argument.idl_type.is_interface_type:
+ forward_declarations.append(argument.idl_type)
+ argument.idl_type.add_includes_for_type(callback_function.extended_attributes)
context = {
'cpp_class': callback_function.name,
- 'cpp_includes': sorted(CALLBACK_FUNCTION_CPP_INCLUDES),
+ 'cpp_includes': sorted(includes),
+ 'forward_declarations': forward_declarations,
bashi 2016/09/23 05:45:18 sorted(forward_declarations)
lkawai 2016/09/23 06:05:36 Done.
'header_includes': sorted(CALLBACK_FUNCTION_H_INCLUDES),
'idl_type': idl_type_str,
'return_cpp_type': (idl_type.cpp_type + '&') if idl_type.cpp_type != 'void' else None,

Powered by Google App Engine
This is Rietveld 408576698