Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: third_party/WebKit/Source/bindings/templates/partial_interface.cpp.tmpl

Issue 2692753003: [Bindings] Update runtime enabled features from partial interfaces (Closed)
Patch Set: Remove needless classname addition Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 {% extends 'interface_base.cpp.tmpl' %} 1 {% extends 'interface_base.cpp.tmpl' %}
2 2
3 {% set has_prepare_prototype_and_interface_object = 3 {% set has_prepare_prototype_and_interface_object =
4 unscopables or has_conditional_attributes_on_prototype or 4 unscopables or has_conditional_attributes_on_prototype or
5 methods | conditionally_exposed(is_partial) %} 5 methods | conditionally_exposed(is_partial) %}
6 {% set prepare_prototype_and_interface_object_func = 6 {% set prepare_prototype_and_interface_object_func =
7 '%s::preparePrototypeAndInterfaceObject' % v8_class_or_partial 7 '%s::preparePrototypeAndInterfaceObject' % v8_class_or_partial
8 if has_prepare_prototype_and_interface_object 8 if has_prepare_prototype_and_interface_object
9 else 'nullptr' %} 9 else 'nullptr' %}
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 {% endblock %} 33 {% endblock %}
34 34
35 35
36 {##############################################################################} 36 {##############################################################################}
37 {% block partial_interface %} 37 {% block partial_interface %}
38 void {{v8_class_or_partial}}::initialize() { 38 void {{v8_class_or_partial}}::initialize() {
39 // Should be invoked from ModulesInitializer. 39 // Should be invoked from ModulesInitializer.
40 {{v8_class}}::updateWrapperTypeInfo( 40 {{v8_class}}::updateWrapperTypeInfo(
41 &{{v8_class_or_partial}}::install{{v8_class}}Template, 41 &{{v8_class_or_partial}}::install{{v8_class}}Template,
42 {% if needs_runtime_enabled_installer %}
43 &{{v8_class_or_partial}}::installRuntimeEnabledFeatures,
44 {% else %}
45 nullptr,
46 {% endif %}
42 {{prepare_prototype_and_interface_object_func}}); 47 {{prepare_prototype_and_interface_object_func}});
43 {% for method in methods %} 48 {% for method in methods %}
44 {% if method.overloads and method.overloads.has_partial_overloads %} 49 {% if method.overloads and method.overloads.has_partial_overloads %}
45 {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInterf ace(&{{cpp_class_or_partial}}V8Internal::{{method.name}}Method); 50 {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInterf ace(&{{cpp_class_or_partial}}V8Internal::{{method.name}}Method);
46 {% endif %} 51 {% endif %}
47 {% endfor %} 52 {% endfor %}
48 } 53 }
49 54
50 {% endblock %} 55 {% endblock %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698