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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 * a C++ pointer to the DOM object (if the object is not in oilpan) #} | 124 * a C++ pointer to the DOM object (if the object is not in oilpan) #} |
125 static const int internalFieldCount = kV8DefaultWrapperInternalFieldCount + {{
custom_internal_field_counter}}; | 125 static const int internalFieldCount = kV8DefaultWrapperInternalFieldCount + {{
custom_internal_field_counter}}; |
126 {# End custom internal fields #} | 126 {# End custom internal fields #} |
127 {% if prepare_prototype_and_interface_object_func %} | 127 {% if prepare_prototype_and_interface_object_func %} |
128 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Conte
xt>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8
::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate); | 128 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Conte
xt>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8
::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate); |
129 {% elif has_partial_interface %} | 129 {% elif has_partial_interface %} |
130 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Conte
xt>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8
::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate)
{} | 130 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Conte
xt>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8
::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate)
{} |
131 {% endif %} | 131 {% endif %} |
132 | 132 |
133 {% if has_partial_interface %} | 133 {% if has_partial_interface %} |
134 {{exported}}static void updateWrapperTypeInfo(InstallTemplateFunction, Install
RuntimeEnabledFunction, PreparePrototypeAndInterfaceObjectFunction); | 134 {{exported}}static void updateWrapperTypeInfo( |
| 135 InstallTemplateFunction, |
| 136 InstallRuntimeEnabledFunction, |
| 137 InstallRuntimeEnabledOnTemplateFunction, |
| 138 PreparePrototypeAndInterfaceObjectFunction); |
135 {{exported}}static void install{{v8_class}}Template(v8::Isolate*, const DOMWra
pperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate); | 139 {{exported}}static void install{{v8_class}}Template(v8::Isolate*, const DOMWra
pperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate); |
136 {% for method in methods if method.overloads and method.overloads.has_partial_
overloads %} | 140 {% for method in methods if method.overloads and method.overloads.has_partial_
overloads %} |
137 {{exported}}static void register{{method.name | blink_capitalize}}MethodForPar
tialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); | 141 {{exported}}static void register{{method.name | blink_capitalize}}MethodForPar
tialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); |
138 {% endfor %} | 142 {% endfor %} |
139 {% endif %} | 143 {% endif %} |
140 | 144 |
141 {% for feature in optional_features %} | 145 {% for feature in optional_features %} |
142 | 146 |
143 static void install{{feature.name}}(v8::Isolate*, const DOMWrapperWorld&, v8::
Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Funct
ion> interface); | 147 static void install{{feature.name}}(v8::Isolate*, const DOMWrapperWorld&, v8::
Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Funct
ion> interface); |
144 static void install{{feature.name}}(ScriptState*, v8::Local<v8::Object> instan
ce); | 148 static void install{{feature.name}}(ScriptState*, v8::Local<v8::Object> instan
ce); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 {{exported}}static void indexedPropertyGetterCallback(uint32_t index, const v8
::PropertyCallbackInfo<v8::Value>&); | 246 {{exported}}static void indexedPropertyGetterCallback(uint32_t index, const v8
::PropertyCallbackInfo<v8::Value>&); |
243 {% endif %} | 247 {% endif %} |
244 {% if indexed_property_setter or named_property_setter %} | 248 {% if indexed_property_setter or named_property_setter %} |
245 {{exported}}static void indexedPropertySetterCallback(uint32_t index, v8::Loca
l<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&); | 249 {{exported}}static void indexedPropertySetterCallback(uint32_t index, v8::Loca
l<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&); |
246 {% endif %} | 250 {% endif %} |
247 {% if indexed_property_deleter or named_property_deleter %} | 251 {% if indexed_property_deleter or named_property_deleter %} |
248 {{exported}}static void indexedPropertyDeleterCallback(uint32_t index, const v
8::PropertyCallbackInfo<v8::Boolean>&); | 252 {{exported}}static void indexedPropertyDeleterCallback(uint32_t index, const v
8::PropertyCallbackInfo<v8::Boolean>&); |
249 {% endif %} | 253 {% endif %} |
250 | 254 |
251 {% if needs_runtime_enabled_installer %} | 255 {% if needs_runtime_enabled_installer %} |
252 {{exported}}static void installRuntimeEnabledFeatures( | 256 {{exported}}static void InstallRuntimeEnabledFeatures( |
253 v8::Isolate* isolate, | 257 v8::Isolate*, |
254 const DOMWrapperWorld& world, | 258 const DOMWrapperWorld& world, |
255 v8::Local<v8::Object> instance, | 259 v8::Local<v8::Object> instance, |
256 v8::Local<v8::Object> prototype, | 260 v8::Local<v8::Object> prototype, |
257 v8::Local<v8::Function> interface); | 261 v8::Local<v8::Function> interface); |
| 262 {{exported}}static void InstallRuntimeEnabledFeaturesOnTemplate( |
| 263 v8::Isolate*, |
| 264 const DOMWrapperWorld&, |
| 265 v8::Local<v8::FunctionTemplate> interface_template); |
258 | 266 |
259 {% if has_partial_interface %} | 267 {% if has_partial_interface %} |
260 static InstallRuntimeEnabledFunction install{{v8_class}}RuntimeEnabledFunction
; | 268 static InstallRuntimeEnabledFunction install{{v8_class}}RuntimeEnabledFunction
; |
| 269 static InstallRuntimeEnabledOnTemplateFunction install{{v8_class}}RuntimeEnabl
edOnTemplateFunction; |
261 {% endif %} | 270 {% endif %} |
262 {% endif %} | 271 {% endif %} |
263 | 272 |
264 {% if has_partial_interface %} | 273 {% if has_partial_interface %} |
265 private: | 274 private: |
266 static InstallTemplateFunction install{{v8_class}}TemplateFunction; | 275 static InstallTemplateFunction install{{v8_class}}TemplateFunction; |
267 {% endif %} | 276 {% endif %} |
268 }; | 277 }; |
269 | 278 |
270 template <> | 279 template <> |
271 struct NativeValueTraits<{{cpp_class}}> : public NativeValueTraitsBase<{{cpp_cla
ss}}> { | 280 struct NativeValueTraits<{{cpp_class}}> : public NativeValueTraitsBase<{{cpp_cla
ss}}> { |
272 {{exported}}static {{cpp_class}}* NativeValue(v8::Isolate*, v8::Local<v8::Valu
e>, ExceptionState&); | 281 {{exported}}static {{cpp_class}}* NativeValue(v8::Isolate*, v8::Local<v8::Valu
e>, ExceptionState&); |
273 }; | 282 }; |
274 | 283 |
275 template <> | 284 template <> |
276 struct V8TypeOf<{{cpp_class}}> { | 285 struct V8TypeOf<{{cpp_class}}> { |
277 typedef {{v8_class}} Type; | 286 typedef {{v8_class}} Type; |
278 }; | 287 }; |
279 | 288 |
280 } // namespace blink | 289 } // namespace blink |
281 | 290 |
282 #endif // {{v8_class}}_h | 291 #endif // {{v8_class}}_h |
283 | 292 |
284 {% endfilter %}{# format_blink_cpp_source_code #} | 293 {% endfilter %}{# format_blink_cpp_source_code #} |
OLD | NEW |