Chromium Code Reviews| 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, |