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' %} |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 {% endif %} | 358 {% endif %} |
359 {% endfilter %} | 359 {% endfilter %} |
360 {% endfilter %} | 360 {% endfilter %} |
361 {% endfor %} | 361 {% endfor %} |
362 {% endif %} | 362 {% endif %} |
363 } | 363 } |
364 | 364 |
365 {% endif %}{# not is_array_buffer_or_view #} | 365 {% endif %}{# not is_array_buffer_or_view #} |
366 {% endblock %} | 366 {% endblock %} |
367 {##############################################################################} | 367 {##############################################################################} |
| 368 {% block origin_trials %} |
| 369 {% from 'attributes.cpp' import attribute_configuration with context %} |
| 370 {% for group in attributes|origin_trial_enabled_attributes|groupby('origin_trial
_feature_name') %}{{newline}} |
| 371 void {{v8_class_or_partial}}::install{{group.grouper}}(v8::Isolate* isolate, con
st DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Functio
n> interface) |
| 372 { |
| 373 v8::Local<v8::Signature> signature; |
| 374 v8::Local<v8::Object> prototype = instance->GetPrototype()->ToObject(isolate
); |
| 375 {% for attribute in group.list | unique_by('name') | sort %} |
| 376 {% if attribute.is_data_type_property %} |
| 377 const V8DOMConfiguration::AttributeConfiguration attribute{{attribute.name}}
Configuration = \ |
| 378 {{attribute_configuration(attribute)}}; |
| 379 V8DOMConfiguration::installAttribute(isolate, world, instance, prototype, at
tribute{{attribute.name}}Configuration); |
| 380 {% else %} |
| 381 const V8DOMConfiguration::AccessorConfiguration accessor{{attribute.name}}Co
nfiguration = \ |
| 382 {{attribute_configuration(attribute)}}; |
| 383 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, int
erface, signature, accessor{{attribute.name}}Configuration); |
| 384 {% endif %} |
| 385 {% endfor %} |
| 386 } |
| 387 {% endfor %} |
| 388 {% endblock %} |
| 389 {##############################################################################} |
368 {% block get_dom_template %}{% endblock %} | 390 {% block get_dom_template %}{% endblock %} |
369 {% block get_dom_template_for_named_properties_object %}{% endblock %} | 391 {% block get_dom_template_for_named_properties_object %}{% endblock %} |
370 {% block has_instance %}{% endblock %} | 392 {% block has_instance %}{% endblock %} |
371 {% block to_impl %}{% endblock %} | 393 {% block to_impl %}{% endblock %} |
372 {% block to_impl_with_type_check %}{% endblock %} | 394 {% block to_impl_with_type_check %}{% endblock %} |
373 {% block install_conditional_attributes %}{% endblock %} | 395 {% block install_conditional_attributes %}{% endblock %} |
374 {##############################################################################} | 396 {##############################################################################} |
375 {% block prepare_prototype_and_interface_object %}{% endblock %} | 397 {% block prepare_prototype_and_interface_object %}{% endblock %} |
376 {##############################################################################} | 398 {##############################################################################} |
377 {% block to_active_scriptwrappable %}{% endblock %} | 399 {% block to_active_scriptwrappable %}{% endblock %} |
378 {% for method in methods if method.is_implemented_in_private_script and method.v
isible %} | 400 {% for method in methods if method.is_implemented_in_private_script and method.v
isible %} |
379 {{method_implemented_in_private_script(method)}} | 401 {{method_implemented_in_private_script(method)}} |
380 {% endfor %} | 402 {% endfor %} |
381 {% for attribute in attributes if attribute.is_implemented_in_private_script %} | 403 {% for attribute in attributes if attribute.is_implemented_in_private_script %} |
382 {{attribute_getter_implemented_in_private_script(attribute)}} | 404 {{attribute_getter_implemented_in_private_script(attribute)}} |
383 {% if attribute.has_setter %} | 405 {% if attribute.has_setter %} |
384 {{attribute_setter_implemented_in_private_script(attribute)}} | 406 {{attribute_setter_implemented_in_private_script(attribute)}} |
385 {% endif %} | 407 {% endif %} |
386 {% endfor %} | 408 {% endfor %} |
387 {% block partial_interface %}{% endblock %} | 409 {% block partial_interface %}{% endblock %} |
388 } // namespace blink | 410 } // namespace blink |
OLD | NEW |