Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 {% filter format_blink_cpp_source_code %} | |
| 2 | |
| 3 {% include 'copyright_block.txt' %} | |
| 4 #ifndef {{v8_class}}_h | |
| 5 #define {{v8_class}}_h | |
| 6 | |
| 7 {% for filename in header_includes %} | |
| 8 #include "{{filename}}" | |
| 9 {% endfor %} | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class {{exported}}{{v8_class}} final : public GarbageCollectedFinalized<{{v8_cla ss}}>, public ActiveDOMCallback { | |
|
Yuki
2016/09/07 10:04:02
Let's start with a simplest version.
We don't need
lkawai
2016/09/08 09:11:31
Done.
| |
| 14 USING_GARBAGE_COLLECTED_MIXIN({{v8_class}}); | |
|
Yuki
2016/09/07 10:04:02
Let's remove this line.
lkawai
2016/09/08 09:11:31
Done.
| |
| 15 | |
| 16 public: | |
| 17 static {{v8_class}}* create(v8::Local<v8::Function> callback, v8::Local<v8:: Object> owner, ScriptState* scriptState) | |
|
Yuki
2016/09/07 10:04:02
We don't need |owner|.
lkawai
2016/09/08 09:11:31
Done.
| |
| 18 { | |
| 19 return new {{v8_class}}(callback, owner, scriptState); | |
| 20 } | |
| 21 | |
| 22 {{v8_class}}(v8::Local<v8::Function>, v8::Local<v8::Object>, ScriptState*); | |
| 23 ~{{v8_class}}() override; | |
| 24 | |
| 25 DECLARE_VIRTUAL_TRACE(); | |
| 26 | |
| 27 bool call({{argument_declarations | join(', ')}}); | |
| 28 ExecutionContext* getExecutionContext() const { return ContextLifecycleObser ver::getExecutionContext(); } | |
|
Yuki
2016/09/07 10:04:02
Let's remove getExecutionContext().
If you need a
lkawai
2016/09/08 09:11:31
Done.
| |
| 29 {{rvalue_cpp_type}} getValue(); | |
| 30 | |
| 31 private: | |
| 32 ScopedPersistent<v8::Function> m_callback; | |
| 33 RefPtr<ScriptState> m_scriptState; | |
| 34 {{member_cpp_type}} returnValue; | |
| 35 }; | |
| 36 | |
| 37 } // namespace blink | |
| 38 #endif // {{v8_class}}_h | |
| 39 | |
| 40 {% endfilter %}{# format_blink_cpp_source_code #} | |
| OLD | NEW |