Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/templates/callback_function.h |
| diff --git a/third_party/WebKit/Source/bindings/templates/callback_interface.h b/third_party/WebKit/Source/bindings/templates/callback_function.h |
| similarity index 52% |
| copy from third_party/WebKit/Source/bindings/templates/callback_interface.h |
| copy to third_party/WebKit/Source/bindings/templates/callback_function.h |
| index b94d2e920cb90bb073b841fba1085c0874c35972..5168e90f74b2b3bdd4ceb8bb6e9280c54cd2138c 100644 |
| --- a/third_party/WebKit/Source/bindings/templates/callback_interface.h |
| +++ b/third_party/WebKit/Source/bindings/templates/callback_function.h |
| @@ -10,29 +10,28 @@ |
| namespace blink { |
| -class {{v8_class}} final : public {{cpp_class}}, public ActiveDOMCallback { |
| - USING_GARBAGE_COLLECTED_MIXIN({{v8_class}}); |
| +class ScriptState; |
| + |
| +class {{exported}}{{v8_class}} final : public GarbageCollectedFinalized<{{v8_class}}>{ |
| + |
| public: |
| static {{v8_class}}* create(v8::Local<v8::Function> callback, ScriptState* scriptState) |
|
peria
2016/09/15 01:14:32
if you don't need scriptState itself, please use "
lkawai
2016/09/16 05:05:50
Done.
|
| { |
| - return new {{v8_class}}(callback, scriptState); |
| + return new {{v8_class}}(callback, scriptState); |
| } |
| - ~{{v8_class}}() override; |
| + {{v8_class}}(v8::Local<v8::Function>, ScriptState*); |
|
peria
2016/09/15 01:14:32
If you have a create() method, I recommend to keep
lkawai
2016/09/16 05:05:50
Done.
|
| + ~{{v8_class}}() = default; |
| DECLARE_VIRTUAL_TRACE(); |
| -{% for method in methods %} |
| - {{method.cpp_type}} {{method.name}}({{method.argument_declarations | join(', ')}}) override; |
| -{% endfor %} |
| -private: |
| - {{exported}}{{v8_class}}(v8::Local<v8::Function>, ScriptState*); |
| + bool call({{argument_declarations | join(', ')}}); |
| +private: |
| ScopedPersistent<v8::Function> m_callback; |
| - RefPtr<ScriptState> m_scriptState; |
| }; |
| -} |
| +} // namespace blink |
| #endif // {{v8_class}}_h |
| {% endfilter %}{# format_blink_cpp_source_code #} |