| OLD | NEW |
| 1 {% include 'copyright_block.txt' %} | 1 {% include 'copyright_block.txt' %} |
| 2 #include "config.h" | 2 #include "config.h" |
| 3 {% filter conditional(conditional_string) %} | 3 {% filter conditional(conditional_string) %} |
| 4 #include "{{v8_class_or_partial}}.h" | 4 #include "{{v8_class_or_partial}}.h" |
| 5 | 5 |
| 6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} | 6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} |
| 7 #include "{{filename}}" | 7 #include "{{filename}}" |
| 8 {% endfor %} | 8 {% endfor %} |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class | 11 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class |
| 12 if is_active_dom_object else '0' %} | 12 if is_active_dom_object else '0' %} |
| 13 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class | 13 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class |
| 14 if has_visit_dom_wrapper else '0' %} | 14 if has_visit_dom_wrapper else '0' %} |
| 15 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface | 15 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface |
| 16 if parent_interface else '0' %} | 16 if parent_interface else '0' %} |
| 17 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception
else | 17 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception
else |
| 18 'WrapperTypeObjectPrototype' %} | 18 'WrapperTypeObjectPrototype' %} |
| 19 {% set dom_template = '%s::domTemplate' % v8_class if not is_array_buffer_or_vie
w else '0' %} | 19 {% set dom_template = '%s::domTemplate' % v8_class if not is_array_buffer_or_vie
w else '0' %} |
| 20 | 20 |
| 21 {% set wrapper_type_info_const = '' if has_partial_interface else 'const ' %} | 21 {% set wrapper_type_info_const = '' if has_partial_interface else 'const ' %} |
| 22 {% if not is_partial %} | 22 {% if not is_partial %} |
| 23 {{wrapper_type_info_const}}WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin
::kEmbedderBlink, {{dom_template}}, {{v8_class}}::refObject, {{v8_class}}::deref
Object, {{v8_class}}::trace, {{to_active_dom_object}}, {{visit_dom_wrapper}}, {{
v8_class}}::installConditionallyEnabledMethods, {{v8_class}}::installConditional
lyEnabledProperties, "{{interface_name}}", {{parent_wrapper_type_info}}, Wrapper
TypeInfo::{{wrapper_type_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, Wra
pperTypeInfo::{{event_target_inheritance}}, WrapperTypeInfo::{{lifetime}}, Wrapp
erTypeInfo::{{gc_type}} }; | 23 {{wrapper_type_info_const}}WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin
::kEmbedderBlink, {{dom_template}}, {{v8_class}}::refObject, {{v8_class}}::deref
Object, {{v8_class}}::trace, {{to_active_dom_object}}, {{visit_dom_wrapper}}, {{
v8_class}}::preparePrototypeObject, {{v8_class}}::installConditionallyEnabledPro
perties, "{{interface_name}}", {{parent_wrapper_type_info}}, WrapperTypeInfo::{{
wrapper_type_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo
::{{event_target_inheritance}}, WrapperTypeInfo::{{lifetime}}, WrapperTypeInfo::
{{gc_type}} }; |
| 24 | 24 |
| 25 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in {{cpp_class}
}.h. | 25 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in {{cpp_class}
}.h. |
| 26 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 26 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
| 27 // bindings/core/v8/ScriptWrappable.h. | 27 // bindings/core/v8/ScriptWrappable.h. |
| 28 {% if not is_typed_array_type %} | 28 {% if not is_typed_array_type %} |
| 29 const WrapperTypeInfo& {{cpp_class}}::s_wrapperTypeInfo = {{v8_class}}::wrapperT
ypeInfo; | 29 const WrapperTypeInfo& {{cpp_class}}::s_wrapperTypeInfo = {{v8_class}}::wrapperT
ypeInfo; |
| 30 {% endif %} | 30 {% endif %} |
| 31 | 31 |
| 32 {% endif %} | 32 {% endif %} |
| 33 {% if not is_array_buffer_or_view %} | 33 {% if not is_array_buffer_or_view %} |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 | 477 |
| 478 {% endif %}{# not is_array_buffer_or_view #} | 478 {% endif %}{# not is_array_buffer_or_view #} |
| 479 {% endblock %} | 479 {% endblock %} |
| 480 {##############################################################################} | 480 {##############################################################################} |
| 481 {% block get_dom_template %}{% endblock %} | 481 {% block get_dom_template %}{% endblock %} |
| 482 {% block has_instance %}{% endblock %} | 482 {% block has_instance %}{% endblock %} |
| 483 {% block to_impl %}{% endblock %} | 483 {% block to_impl %}{% endblock %} |
| 484 {% block to_impl_with_type_check %}{% endblock %} | 484 {% block to_impl_with_type_check %}{% endblock %} |
| 485 {% block install_conditional_attributes %}{% endblock %} | 485 {% block install_conditional_attributes %}{% endblock %} |
| 486 {##############################################################################} | 486 {##############################################################################} |
| 487 {% block install_conditional_methods %} | 487 {% block prepare_prototype_object %}{% endblock %} |
| 488 {% from 'methods.cpp' import install_conditionally_enabled_methods | |
| 489 with context %} | |
| 490 {% if is_partial or conditionally_enabled_methods %} | |
| 491 {{install_conditionally_enabled_methods()}} | |
| 492 | |
| 493 {% endif %} | |
| 494 {% endblock %} | |
| 495 {##############################################################################} | 488 {##############################################################################} |
| 496 {% block to_active_dom_object %}{% endblock %} | 489 {% block to_active_dom_object %}{% endblock %} |
| 497 {% block get_shadow_object_template %}{% endblock %} | 490 {% block get_shadow_object_template %}{% endblock %} |
| 498 {% block ref_object_and_deref_object %}{% endblock %} | 491 {% block ref_object_and_deref_object %}{% endblock %} |
| 499 {% for method in methods if method.is_implemented_in_private_script %} | 492 {% for method in methods if method.is_implemented_in_private_script %} |
| 500 {{method_implemented_in_private_script(method)}} | 493 {{method_implemented_in_private_script(method)}} |
| 501 {% endfor %} | 494 {% endfor %} |
| 502 {% for attribute in attributes if attribute.is_implemented_in_private_script %} | 495 {% for attribute in attributes if attribute.is_implemented_in_private_script %} |
| 503 {{attribute_getter_implemented_in_private_script(attribute)}} | 496 {{attribute_getter_implemented_in_private_script(attribute)}} |
| 504 {% if attribute.has_setter %} | 497 {% if attribute.has_setter %} |
| 505 {{attribute_setter_implemented_in_private_script(attribute)}} | 498 {{attribute_setter_implemented_in_private_script(attribute)}} |
| 506 {% endif %} | 499 {% endif %} |
| 507 {% endfor %} | 500 {% endfor %} |
| 508 {% block partial_interface %}{% endblock %} | 501 {% block partial_interface %}{% endblock %} |
| 509 } // namespace blink | 502 } // namespace blink |
| 510 {% endfilter %} | 503 {% endfilter %} |
| OLD | NEW |