OLD | NEW |
1 {% include 'copyright_block.txt' %} | 1 {% include 'copyright_block.txt' %} |
2 #include "{{v8_class_or_partial}}.h" | 2 #include "{{v8_class_or_partial}}.h" |
3 | 3 |
4 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} | 4 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} |
5 #include "{{filename}}" | 5 #include "{{filename}}" |
6 {% endfor %} | 6 {% endfor %} |
7 | 7 |
8 namespace blink { | 8 namespace blink { |
9 {% set to_active_scriptwrappable = '%s::toActiveScriptWrappable' % v8_class | 9 {% set to_active_scriptwrappable = '%s::toActiveScriptWrappable' % v8_class |
10 if active_scriptwrappable else '0' %} | 10 if active_scriptwrappable else '0' %} |
11 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class | 11 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class |
12 if has_visit_dom_wrapper else '0' %} | 12 if has_visit_dom_wrapper else '0' %} |
13 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface | 13 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface |
14 if parent_interface else '0' %} | 14 if parent_interface else '0' %} |
15 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception
else | 15 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception
else |
16 'WrapperTypeObjectPrototype' %} | 16 'WrapperTypeObjectPrototype' %} |
17 {% set dom_template = '%s::domTemplate' % v8_class if not is_array_buffer_or_vie
w else '0' %} | 17 {% set dom_template = '%s::domTemplate' % v8_class if not is_array_buffer_or_vie
w else '0' %} |
18 | 18 |
19 {% set wrapper_type_info_const = '' if has_partial_interface else 'const ' %} | 19 {% set wrapper_type_info_const = '' if has_partial_interface else 'const ' %} |
20 {% if not is_partial %} | 20 {% if not is_partial %} |
21 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial | 21 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial |
22 // and does not depend on another global objects. | 22 // and does not depend on another global objects. |
23 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 23 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
24 #pragma clang diagnostic push | 24 #pragma clang diagnostic push |
25 #pragma clang diagnostic ignored "-Wglobal-constructors" | 25 #pragma clang diagnostic ignored "-Wglobal-constructors" |
26 #endif | 26 #endif |
27 {{wrapper_type_info_const}}WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin
::kEmbedderBlink, {{dom_template}}, {{v8_class}}::trace, {{to_active_scriptwrapp
able}}, {{visit_dom_wrapper}}, {{v8_class}}::preparePrototypeAndInterfaceObject,
{{v8_class}}::installConditionallyEnabledProperties, "{{interface_name}}", {{pa
rent_wrapper_type_info}}, WrapperTypeInfo::{{wrapper_type_prototype}}, WrapperTy
peInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{event_target_inheritance}}, Wra
pperTypeInfo::{{lifetime}} }; | 27 {{wrapper_type_info_const}}WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin
::kEmbedderBlink, {{dom_template}}, {{v8_class}}::trace, {{to_active_scriptwrapp
able}}, {{visit_dom_wrapper}}, {{v8_class}}::preparePrototypeAndInterfaceObject,
{% if has_conditional_attributes %} {{v8_class}}::installConditionallyEnabledPro
perties{% else %} nullptr{% endif %}, "{{interface_name}}", {{parent_wrapper_typ
e_info}}, WrapperTypeInfo::{{wrapper_type_prototype}}, WrapperTypeInfo::{{wrappe
r_class_id}}, WrapperTypeInfo::{{event_target_inheritance}}, WrapperTypeInfo::{{
lifetime}} }; |
28 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 28 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
29 #pragma clang diagnostic pop | 29 #pragma clang diagnostic pop |
30 #endif | 30 #endif |
31 | 31 |
32 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in {{cpp_class}
}.h. | 32 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in {{cpp_class}
}.h. |
33 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 33 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
34 // bindings/core/v8/ScriptWrappable.h. | 34 // bindings/core/v8/ScriptWrappable.h. |
35 {% if not is_typed_array_type %} | 35 {% if not is_typed_array_type %} |
36 const WrapperTypeInfo& {{cpp_class}}::s_wrapperTypeInfo = {{v8_class}}::wrapperT
ypeInfo; | 36 const WrapperTypeInfo& {{cpp_class}}::s_wrapperTypeInfo = {{v8_class}}::wrapperT
ypeInfo; |
37 {% endif %} | 37 {% endif %} |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 {{method_implemented_in_private_script(method)}} | 408 {{method_implemented_in_private_script(method)}} |
409 {% endfor %} | 409 {% endfor %} |
410 {% for attribute in attributes if attribute.is_implemented_in_private_script %} | 410 {% for attribute in attributes if attribute.is_implemented_in_private_script %} |
411 {{attribute_getter_implemented_in_private_script(attribute)}} | 411 {{attribute_getter_implemented_in_private_script(attribute)}} |
412 {% if attribute.has_setter %} | 412 {% if attribute.has_setter %} |
413 {{attribute_setter_implemented_in_private_script(attribute)}} | 413 {{attribute_setter_implemented_in_private_script(attribute)}} |
414 {% endif %} | 414 {% endif %} |
415 {% endfor %} | 415 {% endfor %} |
416 {% block partial_interface %}{% endblock %} | 416 {% block partial_interface %}{% endblock %} |
417 } // namespace blink | 417 } // namespace blink |
OLD | NEW |