| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 }; | 382 }; |
| 383 | 383 |
| 384 {% endif %} | 384 {% endif %} |
| 385 {% endblock %} | 385 {% endblock %} |
| 386 {##############################################################################} | 386 {##############################################################################} |
| 387 {% block install_methods %} | 387 {% block install_methods %} |
| 388 {% from 'methods.cpp.tmpl' import method_configuration with context %} | 388 {% from 'methods.cpp.tmpl' import method_configuration with context %} |
| 389 {% if methods | has_method_configuration(is_partial) %} | 389 {% if methods | has_method_configuration(is_partial) %} |
| 390 const V8DOMConfiguration::MethodConfiguration {{v8_class}}Methods[] = { | 390 const V8DOMConfiguration::MethodConfiguration {{v8_class}}Methods[] = { |
| 391 {% for method in methods | has_method_configuration(is_partial) %} | 391 {% for method in methods | has_method_configuration(is_partial) %} |
| 392 {{method_configuration(method)}}, | 392 {{method_configuration(method) | indent(4)}}, |
| 393 {% endfor %} | 393 {% endfor %} |
| 394 }; | 394 }; |
| 395 | 395 |
| 396 {% endif %} | 396 {% endif %} |
| 397 {% endblock %} | 397 {% endblock %} |
| 398 {% endif %}{# not is_array_buffer_or_view #} | 398 {% endif %}{# not is_array_buffer_or_view #} |
| 399 {##############################################################################} | 399 {##############################################################################} |
| 400 {% block named_constructor %}{% endblock %} | 400 {% block named_constructor %}{% endblock %} |
| 401 {% block constructor_callback %}{% endblock %} | 401 {% block constructor_callback %}{% endblock %} |
| 402 {##############################################################################} | 402 {##############################################################################} |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 {% endfor %} | 664 {% endfor %} |
| 665 {# Origin-Trial-enabled constants #} | 665 {# Origin-Trial-enabled constants #} |
| 666 {% for constant in feature.constants %} | 666 {% for constant in feature.constants %} |
| 667 {% set constant_name = constant.name.title().replace('_', '') %} | 667 {% set constant_name = constant.name.title().replace('_', '') %} |
| 668 const V8DOMConfiguration::ConstantConfiguration constant{{constant_name}}Confi
guration = {{constant_configuration(constant)}}; | 668 const V8DOMConfiguration::ConstantConfiguration constant{{constant_name}}Confi
guration = {{constant_configuration(constant)}}; |
| 669 V8DOMConfiguration::installConstant(isolate, interface, prototype, constant{{c
onstant_name}}Configuration); | 669 V8DOMConfiguration::installConstant(isolate, interface, prototype, constant{{c
onstant_name}}Configuration); |
| 670 {% endfor %} | 670 {% endfor %} |
| 671 {# Origin-Trial-enabled methods (no overloads) #} | 671 {# Origin-Trial-enabled methods (no overloads) #} |
| 672 {% for method in feature.methods %} | 672 {% for method in feature.methods %} |
| 673 {% set method_name = method.name.title().replace('_', '') %} | 673 {% set method_name = method.name.title().replace('_', '') %} |
| 674 const V8DOMConfiguration::MethodConfiguration method{{method_name}}Configurati
on = {{method_configuration(method)}}; | 674 const V8DOMConfiguration::MethodConfiguration method{{method_name}}Configurati
on[] = { |
| 675 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interfa
ce, signature, method{{method_name}}Configuration); | 675 {{method_configuration(method) | indent(2)}} |
| 676 }; |
| 677 for (const auto& methodConfig : method{{method_name}}Configuration) |
| 678 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, inter
face, signature, methodConfig); |
| 676 {% endfor %} | 679 {% endfor %} |
| 677 } | 680 } |
| 678 | 681 |
| 679 void {{v8_class_or_partial}}::install{{feature.name}}(ScriptState* scriptState,
v8::Local<v8::Object> instance) { | 682 void {{v8_class_or_partial}}::install{{feature.name}}(ScriptState* scriptState,
v8::Local<v8::Object> instance) { |
| 680 V8PerContextData* perContextData = V8PerContextData::from(scriptState->context
()); | 683 V8PerContextData* perContextData = V8PerContextData::from(scriptState->context
()); |
| 681 v8::Local<v8::Object> prototype = perContextData->prototypeForType(&{{v8_class
}}::wrapperTypeInfo); | 684 v8::Local<v8::Object> prototype = perContextData->prototypeForType(&{{v8_class
}}::wrapperTypeInfo); |
| 682 v8::Local<v8::Function> interface = perContextData->constructorForType(&{{v8_c
lass}}::wrapperTypeInfo); | 685 v8::Local<v8::Function> interface = perContextData->constructorForType(&{{v8_c
lass}}::wrapperTypeInfo); |
| 683 ALLOW_UNUSED_LOCAL(interface); | 686 ALLOW_UNUSED_LOCAL(interface); |
| 684 install{{feature.name}}(scriptState->isolate(), scriptState->world(), instance
, prototype, interface); | 687 install{{feature.name}}(scriptState->isolate(), scriptState->world(), instance
, prototype, interface); |
| 685 } | 688 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 {% endif %} | 741 {% endif %} |
| 739 } | 742 } |
| 740 {% endif %} | 743 {% endif %} |
| 741 | 744 |
| 742 {% endblock %} | 745 {% endblock %} |
| 743 {##############################################################################} | 746 {##############################################################################} |
| 744 {% block partial_interface %}{% endblock %} | 747 {% block partial_interface %}{% endblock %} |
| 745 } // namespace blink | 748 } // namespace blink |
| 746 | 749 |
| 747 {% endfilter %}{# format_blink_cpp_source_code #} | 750 {% endfilter %}{# format_blink_cpp_source_code #} |
| OLD | NEW |