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 |
(...skipping 29 matching lines...) Expand all Loading... |
40 static {{cpp_class}}* toImpl(v8::Local<v8::Object> object) { | 40 static {{cpp_class}}* toImpl(v8::Local<v8::Object> object) { |
41 return toScriptWrappable(object)->toImpl<{{cpp_class}}>(); | 41 return toScriptWrappable(object)->toImpl<{{cpp_class}}>(); |
42 } | 42 } |
43 {% endif %} | 43 {% endif %} |
44 {{exported}}static {{cpp_class}}* toImplWithTypeCheck(v8::Isolate*, v8::Local<
v8::Value>); | 44 {{exported}}static {{cpp_class}}* toImplWithTypeCheck(v8::Isolate*, v8::Local<
v8::Value>); |
45 {% if has_partial_interface %} | 45 {% if has_partial_interface %} |
46 {{exported}}static WrapperTypeInfo wrapperTypeInfo; | 46 {{exported}}static WrapperTypeInfo wrapperTypeInfo; |
47 {% else %} | 47 {% else %} |
48 {{exported}}static const WrapperTypeInfo wrapperTypeInfo; | 48 {{exported}}static const WrapperTypeInfo wrapperTypeInfo; |
49 {% endif %} | 49 {% endif %} |
50 template<typename VisitorDispatcher> | 50 static void trace(Visitor* visitor, ScriptWrappable* scriptWrappable) { |
51 static void trace(VisitorDispatcher visitor, ScriptWrappable* scriptWrappable)
{ | |
52 visitor->trace(scriptWrappable->toImpl<{{cpp_class}}>()); | 51 visitor->trace(scriptWrappable->toImpl<{{cpp_class}}>()); |
53 } | 52 } |
54 static void traceWrappers(WrapperVisitor* visitor, ScriptWrappable* scriptWrap
pable) { | 53 static void traceWrappers(WrapperVisitor* visitor, ScriptWrappable* scriptWrap
pable) { |
55 visitor->traceWrappers(scriptWrappable->toImpl<{{cpp_class}}>()); | 54 visitor->traceWrappers(scriptWrappable->toImpl<{{cpp_class}}>()); |
56 } | 55 } |
57 {% if has_visit_dom_wrapper %} | 56 {% if has_visit_dom_wrapper %} |
58 static void visitDOMWrapper(v8::Isolate*, ScriptWrappable*, const v8::Persiste
nt<v8::Object>&); | 57 static void visitDOMWrapper(v8::Isolate*, ScriptWrappable*, const v8::Persiste
nt<v8::Object>&); |
59 {% endif %} | 58 {% endif %} |
60 {% if has_visit_dom_wrapper_custom %} | 59 {% if has_visit_dom_wrapper_custom %} |
61 static void visitDOMWrapperCustom(v8::Isolate*, ScriptWrappable*, const v8::Pe
rsistent<v8::Object>&); | 60 static void visitDOMWrapperCustom(v8::Isolate*, ScriptWrappable*, const v8::Pe
rsistent<v8::Object>&); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 template <> | 180 template <> |
182 struct V8TypeOf<{{cpp_class}}> { | 181 struct V8TypeOf<{{cpp_class}}> { |
183 typedef {{v8_class}} Type; | 182 typedef {{v8_class}} Type; |
184 }; | 183 }; |
185 | 184 |
186 } // namespace blink | 185 } // namespace blink |
187 | 186 |
188 #endif // {{v8_class}}_h | 187 #endif // {{v8_class}}_h |
189 | 188 |
190 {% endfilter %}{# format_blink_cpp_source_code #} | 189 {% endfilter %}{# format_blink_cpp_source_code #} |
OLD | NEW |