| OLD | NEW |
| 1 {% filter format_blink_cpp_source_code %} | 1 {% filter format_blink_cpp_source_code %} |
| 2 | 2 |
| 3 {% include 'copyright_block.txt' %} | 3 {% include 'copyright_block.txt' %} |
| 4 #ifndef {{v8_class}}_h | 4 #ifndef {{v8_class}}_h |
| 5 #define {{v8_class}}_h | 5 #define {{v8_class}}_h |
| 6 | 6 |
| 7 {% for filename in header_includes %} | 7 {% for filename in header_includes %} |
| 8 #include "{{filename}}" | 8 #include "{{filename}}" |
| 9 {% endfor %} | 9 {% endfor %} |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class {{v8_class}} final : public {{cpp_class}}, public ActiveDOMCallback { | 13 class ScriptState; |
| 14 USING_GARBAGE_COLLECTED_MIXIN({{v8_class}}); | 14 |
| 15 class {{exported}}{{v8_class}} final : public GarbageCollectedFinalized<{{v8_cla
ss}}>{ |
| 16 |
| 15 public: | 17 public: |
| 16 static {{v8_class}}* create(v8::Local<v8::Function> callback, ScriptState* s
criptState) | 18 static {{v8_class}}* create(v8::Local<v8::Function> callback, ScriptState* s
criptState) |
| 17 { | 19 { |
| 18 return new {{v8_class}}(callback, scriptState); | 20 return new {{v8_class}}(callback, scriptState); |
| 19 } | 21 } |
| 20 | 22 |
| 21 ~{{v8_class}}() override; | 23 {{v8_class}}(v8::Local<v8::Function>, ScriptState*); |
| 24 ~{{v8_class}}() = default; |
| 22 | 25 |
| 23 DECLARE_VIRTUAL_TRACE(); | 26 DECLARE_VIRTUAL_TRACE(); |
| 24 | 27 |
| 25 {% for method in methods %} | 28 bool call({{argument_declarations | join(', ')}}); |
| 26 {{method.cpp_type}} {{method.name}}({{method.argument_declarations | join(',
')}}) override; | 29 {% if rvalue_cpp_type != 'void' %} |
| 27 {% endfor %} | 30 {{rvalue_cpp_type}} getValue(); |
| 31 {% endif %} |
| 32 |
| 28 private: | 33 private: |
| 29 {{exported}}{{v8_class}}(v8::Local<v8::Function>, ScriptState*); | |
| 30 | |
| 31 ScopedPersistent<v8::Function> m_callback; | 34 ScopedPersistent<v8::Function> m_callback; |
| 32 RefPtr<ScriptState> m_scriptState; | 35 RefPtr<ScriptState> m_scriptState; |
| 36 {% if rvalue_cpp_type != 'void' %} |
| 37 {{member_cpp_type}} returnValue; |
| 38 {% endif %} |
| 33 }; | 39 }; |
| 34 | 40 |
| 35 } | 41 } // namespace blink |
| 36 #endif // {{v8_class}}_h | 42 #endif // {{v8_class}}_h |
| 37 | 43 |
| 38 {% endfilter %}{# format_blink_cpp_source_code #} | 44 {% endfilter %}{# format_blink_cpp_source_code #} |
| OLD | NEW |