OLD | NEW |
1 {% include 'copyright_block.txt' %} | 1 {% include 'copyright_block.txt' %} |
2 #ifndef {{v8_class}}_h | 2 #ifndef {{v8_class}}_h |
3 #define {{v8_class}}_h | 3 #define {{v8_class}}_h |
4 | 4 |
5 {% for filename in header_includes %} | 5 {% for filename in header_includes %} |
6 #include "{{filename}}" | 6 #include "{{filename}}" |
7 {% endfor %} | 7 {% endfor %} |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 { | 55 { |
56 return toScriptWrappable(object)->toImpl<{{cpp_class}}>(); | 56 return toScriptWrappable(object)->toImpl<{{cpp_class}}>(); |
57 } | 57 } |
58 {% endif %} | 58 {% endif %} |
59 {{exported}}static {{cpp_class}}* toImplWithTypeCheck(v8::Isolate*, v8::Loca
l<v8::Value>); | 59 {{exported}}static {{cpp_class}}* toImplWithTypeCheck(v8::Isolate*, v8::Loca
l<v8::Value>); |
60 {% if has_partial_interface %} | 60 {% if has_partial_interface %} |
61 {{exported}}static WrapperTypeInfo wrapperTypeInfo; | 61 {{exported}}static WrapperTypeInfo wrapperTypeInfo; |
62 {% else %} | 62 {% else %} |
63 {{exported}}static const WrapperTypeInfo wrapperTypeInfo; | 63 {{exported}}static const WrapperTypeInfo wrapperTypeInfo; |
64 {% endif %} | 64 {% endif %} |
65 static HeapObjectHeader* getHeapObjectHeader(ScriptWrappable* scriptWrappabl
e) | |
66 { | |
67 return HeapObjectHeader::fromPayload(scriptWrappable->toImpl<{{cpp_class
}}>()); | |
68 } | |
69 template<typename VisitorDispatcher> | 65 template<typename VisitorDispatcher> |
70 static void trace(VisitorDispatcher visitor, ScriptWrappable* scriptWrappabl
e) | 66 static void trace(VisitorDispatcher visitor, ScriptWrappable* scriptWrappabl
e) |
71 { | 67 { |
72 visitor->trace(scriptWrappable->toImpl<{{cpp_class}}>()); | 68 visitor->trace(scriptWrappable->toImpl<{{cpp_class}}>()); |
73 } | 69 } |
| 70 static void traceWrappers(WrapperVisitor* visitor, ScriptWrappable* scriptWr
appable) |
| 71 { |
| 72 visitor->traceWrappers(scriptWrappable->toImpl<{{cpp_class}}>()); |
| 73 } |
74 {% if has_visit_dom_wrapper %} | 74 {% if has_visit_dom_wrapper %} |
75 static void visitDOMWrapper(v8::Isolate*, ScriptWrappable*, const v8::Persis
tent<v8::Object>&); | 75 static void visitDOMWrapper(v8::Isolate*, ScriptWrappable*, const v8::Persis
tent<v8::Object>&); |
76 {% endif %} | 76 {% endif %} |
77 {% if active_scriptwrappable %} | 77 {% if active_scriptwrappable %} |
78 static ActiveScriptWrappable* toActiveScriptWrappable(v8::Local<v8::Object>)
; | 78 static ActiveScriptWrappable* toActiveScriptWrappable(v8::Local<v8::Object>)
; |
79 {% endif %} | 79 {% endif %} |
80 {% for method in methods %} | 80 {% for method in methods %} |
81 {% if method.is_custom %} | 81 {% if method.is_custom %} |
82 static void {{method.name}}MethodCustom(const v8::FunctionCallbackInfo<v8::V
alue>&); | 82 static void {{method.name}}MethodCustom(const v8::FunctionCallbackInfo<v8::V
alue>&); |
83 {% endif %} | 83 {% endif %} |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 183 |
184 {% endif %} | 184 {% endif %} |
185 template <> | 185 template <> |
186 struct V8TypeOf<{{cpp_class}}> { | 186 struct V8TypeOf<{{cpp_class}}> { |
187 typedef {{v8_class}} Type; | 187 typedef {{v8_class}} Type; |
188 }; | 188 }; |
189 | 189 |
190 } // namespace blink | 190 } // namespace blink |
191 | 191 |
192 #endif // {{v8_class}}_h | 192 #endif // {{v8_class}}_h |
OLD | NEW |