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 #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 { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 with context %} | 89 with context %} |
90 {% for constant in constants | has_special_getter %} | 90 {% for constant in constants | has_special_getter %} |
91 {{constant_getter_callback(constant)}} | 91 {{constant_getter_callback(constant)}} |
92 {% endfor %} | 92 {% endfor %} |
93 {# Attributes #} | 93 {# Attributes #} |
94 {##############################################################################} | 94 {##############################################################################} |
95 {% from 'attributes.cpp.tmpl' import constructor_getter_callback, | 95 {% from 'attributes.cpp.tmpl' import constructor_getter_callback, |
96 attribute_getter, attribute_getter_callback, | 96 attribute_getter, attribute_getter_callback, |
97 attribute_setter, attribute_setter_callback, | 97 attribute_setter, attribute_setter_callback, |
98 attribute_cache_property_callback, | 98 attribute_cache_property_callback, |
99 attribute_getter_implemented_in_private_script, | |
100 attribute_setter_implemented_in_private_script | |
101 with context %} | 99 with context %} |
102 {% for attribute in attributes if attribute.should_be_exposed_to_script %} | 100 {% for attribute in attributes %} |
103 {% if attribute.is_cached_accessor %} | 101 {% if attribute.is_cached_accessor %} |
104 {{attribute_cache_property_callback(attribute)}} | 102 {{attribute_cache_property_callback(attribute)}} |
105 {% endif %} | 103 {% endif %} |
106 {% for world_suffix in attribute.world_suffixes %} | 104 {% for world_suffix in attribute.world_suffixes %} |
107 {% if not attribute.has_custom_getter and not attribute.constructor_type %} | 105 {% if not attribute.has_custom_getter and not attribute.constructor_type %} |
108 {{attribute_getter(attribute, world_suffix)}} | 106 {{attribute_getter(attribute, world_suffix)}} |
109 {% endif %} | 107 {% endif %} |
110 {% if not attribute.constructor_type %} | 108 {% if not attribute.constructor_type %} |
111 {{attribute_getter_callback(attribute, world_suffix)}} | 109 {{attribute_getter_callback(attribute, world_suffix)}} |
112 {% elif attribute.needs_constructor_getter_callback %} | 110 {% elif attribute.needs_constructor_getter_callback %} |
113 {{constructor_getter_callback(attribute, world_suffix)}} | 111 {{constructor_getter_callback(attribute, world_suffix)}} |
114 {% endif %} | 112 {% endif %} |
115 {% if attribute.has_setter %} | 113 {% if attribute.has_setter %} |
116 {% if not attribute.has_custom_setter %} | 114 {% if not attribute.has_custom_setter %} |
117 {{attribute_setter(attribute, world_suffix)}} | 115 {{attribute_setter(attribute, world_suffix)}} |
118 {% endif %} | 116 {% endif %} |
119 {{attribute_setter_callback(attribute, world_suffix)}} | 117 {{attribute_setter_callback(attribute, world_suffix)}} |
120 {% endif %} | 118 {% endif %} |
121 {% endfor %} | 119 {% endfor %} |
122 {% endfor %} | 120 {% endfor %} |
123 {##############################################################################} | 121 {##############################################################################} |
124 {# Methods #} | 122 {# Methods #} |
125 {% from 'methods.cpp.tmpl' import generate_method, overload_resolution_method, | 123 {% from 'methods.cpp.tmpl' import generate_method, overload_resolution_method, |
126 method_callback, origin_safe_method_getter, generate_constructor, | 124 method_callback, origin_safe_method_getter, generate_constructor, |
127 method_implemented_in_private_script, generate_post_message_impl, | 125 generate_post_message_impl, runtime_determined_length_method, |
128 runtime_determined_length_method, runtime_determined_maxarg_method | 126 runtime_determined_maxarg_method |
129 with context %} | 127 with context %} |
130 {% for method in methods if method.should_be_exposed_to_script %} | 128 {% for method in methods %} |
131 {% for world_suffix in method.world_suffixes %} | 129 {% for world_suffix in method.world_suffixes %} |
132 {% if not method.is_custom and not method.is_post_message and method.visible %} | 130 {% if not method.is_custom and not method.is_post_message and method.visible %} |
133 {{generate_method(method, world_suffix)}} | 131 {{generate_method(method, world_suffix)}} |
134 {% endif %} | 132 {% endif %} |
135 {% if method.is_post_message and not is_partial %} | 133 {% if method.is_post_message and not is_partial %} |
136 {{generate_post_message_impl(method)}} | 134 {{generate_post_message_impl(method)}} |
137 {% endif %} | 135 {% endif %} |
138 {% if method.overloads and method.overloads.visible %} | 136 {% if method.overloads and method.overloads.visible %} |
139 {% if method.overloads.runtime_determined_lengths %} | 137 {% if method.overloads.runtime_determined_lengths %} |
140 {{runtime_determined_length_method(method.overloads)}} | 138 {{runtime_determined_length_method(method.overloads)}} |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 | 479 |
482 {% if has_array_iterator and not is_partial %} | 480 {% if has_array_iterator and not is_partial %} |
483 // Array iterator (@@iterator) | 481 // Array iterator (@@iterator) |
484 {%+ if is_global %}instanceTemplate{% else %}prototypeTemplate{% endif %}->Set
IntrinsicDataProperty(v8::Symbol::GetIterator(isolate), v8::kArrayProto_values,
v8::DontEnum); | 482 {%+ if is_global %}instanceTemplate{% else %}prototypeTemplate{% endif %}->Set
IntrinsicDataProperty(v8::Symbol::GetIterator(isolate), v8::kArrayProto_values,
v8::DontEnum); |
485 {% endif %} | 483 {% endif %} |
486 | 484 |
487 {% if iterator_method %} | 485 {% if iterator_method %} |
488 {% filter exposed(iterator_method.exposed_test) %} | 486 {% filter exposed(iterator_method.exposed_test) %} |
489 {% filter runtime_enabled(iterator_method.runtime_enabled_function) %} | 487 {% filter runtime_enabled(iterator_method.runtime_enabled_function) %} |
490 // Iterator (@@iterator) | 488 // Iterator (@@iterator) |
491 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorCo
nfiguration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Internal::ite
ratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts, V
8DOMConfiguration::OnPrototype }; | 489 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorCo
nfiguration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Internal::ite
ratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; |
492 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature
, symbolKeyedIteratorConfiguration); | 490 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature
, symbolKeyedIteratorConfiguration); |
493 {% endfilter %} | 491 {% endfilter %} |
494 {% endfilter %} | 492 {% endfilter %} |
495 {% endif %} | 493 {% endif %} |
496 | 494 |
497 {% if legacy_caller and not is_partial %} | 495 {% if legacy_caller and not is_partial %} |
498 instanceTemplate->SetCallAsFunctionHandler({{cpp_class_or_partial}}V8Internal:
:{{legacy_caller.name}}MethodCallback); | 496 instanceTemplate->SetCallAsFunctionHandler({{cpp_class_or_partial}}V8Internal:
:{{legacy_caller.name}}MethodCallback); |
499 {% elif has_custom_legacy_call_as_function and not is_partial %} | 497 {% elif has_custom_legacy_call_as_function and not is_partial %} |
500 instanceTemplate->SetCallAsFunctionHandler({{v8_class}}::legacyCallCustom); | 498 instanceTemplate->SetCallAsFunctionHandler({{v8_class}}::legacyCallCustom); |
501 {% endif %} | 499 {% endif %} |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 {% endblock %} | 581 {% endblock %} |
584 {##############################################################################} | 582 {##############################################################################} |
585 {% block get_dom_template %}{% endblock %} | 583 {% block get_dom_template %}{% endblock %} |
586 {% block get_dom_template_for_named_properties_object %}{% endblock %} | 584 {% block get_dom_template_for_named_properties_object %}{% endblock %} |
587 {% block has_instance %}{% endblock %} | 585 {% block has_instance %}{% endblock %} |
588 {% block to_impl %}{% endblock %} | 586 {% block to_impl %}{% endblock %} |
589 {% block to_impl_with_type_check %}{% endblock %} | 587 {% block to_impl_with_type_check %}{% endblock %} |
590 {##############################################################################} | 588 {##############################################################################} |
591 {% block prepare_prototype_and_interface_object %}{% endblock %} | 589 {% block prepare_prototype_and_interface_object %}{% endblock %} |
592 {##############################################################################} | 590 {##############################################################################} |
593 {% for method in methods if method.is_implemented_in_private_script and method.v
isible %} | |
594 {{method_implemented_in_private_script(method)}} | |
595 {% endfor %} | |
596 {% for attribute in attributes if attribute.is_implemented_in_private_script %} | |
597 {{attribute_getter_implemented_in_private_script(attribute)}} | |
598 {% if attribute.has_setter %} | |
599 {{attribute_setter_implemented_in_private_script(attribute)}} | |
600 {% endif %} | |
601 {% endfor %} | |
602 {% block partial_interface %}{% endblock %} | 591 {% block partial_interface %}{% endblock %} |
603 } // namespace blink | 592 } // namespace blink |
604 | 593 |
605 {% endfilter %}{# format_blink_cpp_source_code #} | 594 {% endfilter %}{# format_blink_cpp_source_code #} |
OLD | NEW |