OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! | 5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! |
6 | 6 |
7 #include "config.h" | 7 #include "config.h" |
8 {% filter conditional(conditional_string) %} | 8 {% filter conditional(conditional_string) %} |
9 #include "{{v8_class}}.h" | 9 #include "{{v8_class}}.h" |
10 | 10 |
11 {% for filename in cpp_includes %} | 11 {% for filename in cpp_includes %} |
12 #include "{{filename}}" | 12 #include "{{filename}}" |
13 {% endfor %} | 13 {% endfor %} |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 {{v8_class}}::{{v8_class}}(v8::Local<v8::Function> callback, ScriptState* script
State) | 17 {{v8_class}}::{{v8_class}}(v8::Local<v8::Function> callback, ScriptState* script
State) |
18 : ActiveDOMCallback(scriptState->executionContext()) | 18 : ActiveDOMCallback(scriptState->executionContext()) |
19 , m_scriptState(scriptState) | 19 , m_scriptState(scriptState) |
20 { | 20 { |
21 m_callback.set(scriptState->isolate(), callback); | 21 m_callback.set(scriptState->isolate(), callback); |
22 } | 22 } |
23 | 23 |
24 {{v8_class}}::~{{v8_class}}() | 24 {{v8_class}}::~{{v8_class}}() |
25 { | 25 { |
26 } | 26 } |
27 | 27 |
28 void {{v8_class}}::trace(Visitor* visitor) | 28 DEFINE_TRACE({{v8_class}}) |
29 { | 29 { |
30 {{cpp_class}}::trace(visitor); | 30 {{cpp_class}}::trace(visitor); |
31 ActiveDOMCallback::trace(visitor); | 31 ActiveDOMCallback::trace(visitor); |
32 } | 32 } |
33 | 33 |
34 {% for method in methods if not method.is_custom %} | 34 {% for method in methods if not method.is_custom %} |
35 {{method.cpp_type}} {{v8_class}}::{{method.name}}({{method.argument_declarations
| join(', ')}}) | 35 {{method.cpp_type}} {{v8_class}}::{{method.name}}({{method.argument_declarations
| join(', ')}}) |
36 { | 36 { |
37 {% set return_default = 'return true' | 37 {% set return_default = 'return true' |
38 if method.idl_type == 'boolean' else 'return' %}{# void #} | 38 if method.idl_type == 'boolean' else 'return' %}{# void #} |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 ScriptController::callFunction(m_scriptState->executionContext(), m_callback
.newLocal(m_scriptState->isolate()), {{this_handle_parameter}}{{method.arguments
| length}}, argv, m_scriptState->isolate()); | 73 ScriptController::callFunction(m_scriptState->executionContext(), m_callback
.newLocal(m_scriptState->isolate()), {{this_handle_parameter}}{{method.arguments
| length}}, argv, m_scriptState->isolate()); |
74 return !exceptionCatcher.HasCaught(); | 74 return !exceptionCatcher.HasCaught(); |
75 {% else %}{# void #} | 75 {% else %}{# void #} |
76 ScriptController::callFunction(m_scriptState->executionContext(), m_callback
.newLocal(m_scriptState->isolate()), {{this_handle_parameter}}{{method.arguments
| length}}, argv, m_scriptState->isolate()); | 76 ScriptController::callFunction(m_scriptState->executionContext(), m_callback
.newLocal(m_scriptState->isolate()), {{this_handle_parameter}}{{method.arguments
| length}}, argv, m_scriptState->isolate()); |
77 {% endif %} | 77 {% endif %} |
78 } | 78 } |
79 | 79 |
80 {% endfor %} | 80 {% endfor %} |
81 } // namespace blink | 81 } // namespace blink |
82 {% endfilter %} | 82 {% endfilter %} |
OLD | NEW |