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

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

Issue 2005433002: [Origin Trials] Install origin trial bindings on V8 context conditionally (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-ef-install
Patch Set: Fix multiple definition of signature; addressing nits Created 4 years, 6 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 {% 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
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}}(ScriptState* scriptState, v8::Local<v8::Object> instance)
372 {
373 v8::Local<v8::Object> prototype = instance->GetPrototype()->ToObject(scriptS tate->isolate());
374 v8::Local<v8::Signature> signature;
375 ALLOW_UNUSED_LOCAL(signature);
376 {% for attribute in group.list | unique_by('name') | sort %}
377 {% if attribute.is_data_type_property %}
378 const V8DOMConfiguration::AttributeConfiguration attribute{{attribute.name}} Configuration = \
379 {{attribute_configuration(attribute)}};
380 V8DOMConfiguration::installAttribute(scriptState->isolate(), scriptState->wo rld(), instance, prototype, attribute{{attribute.name}}Configuration);
381 {% else %}
382 const V8DOMConfiguration::AccessorConfiguration accessor{{attribute.name}}Co nfiguration = \
383 {{attribute_configuration(attribute)}};
384 V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->wor ld(), instance, prototype, v8::Local<v8::Function>(), signature, accessor{{attri bute.name}}Configuration);
385 {% endif %}
386 {% endfor %}
387 }
388 {% endfor %}
389 {% endblock %}
390 {##############################################################################}
368 {% block get_dom_template %}{% endblock %} 391 {% block get_dom_template %}{% endblock %}
369 {% block get_dom_template_for_named_properties_object %}{% endblock %} 392 {% block get_dom_template_for_named_properties_object %}{% endblock %}
370 {% block has_instance %}{% endblock %} 393 {% block has_instance %}{% endblock %}
371 {% block to_impl %}{% endblock %} 394 {% block to_impl %}{% endblock %}
372 {% block to_impl_with_type_check %}{% endblock %} 395 {% block to_impl_with_type_check %}{% endblock %}
373 {% block install_conditional_attributes %}{% endblock %} 396 {% block install_conditional_attributes %}{% endblock %}
374 {##############################################################################} 397 {##############################################################################}
375 {% block prepare_prototype_and_interface_object %}{% endblock %} 398 {% block prepare_prototype_and_interface_object %}{% endblock %}
376 {##############################################################################} 399 {##############################################################################}
377 {% block to_active_scriptwrappable %}{% endblock %} 400 {% block to_active_scriptwrappable %}{% endblock %}
378 {% for method in methods if method.is_implemented_in_private_script and method.v isible %} 401 {% for method in methods if method.is_implemented_in_private_script and method.v isible %}
379 {{method_implemented_in_private_script(method)}} 402 {{method_implemented_in_private_script(method)}}
380 {% endfor %} 403 {% endfor %}
381 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 404 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
382 {{attribute_getter_implemented_in_private_script(attribute)}} 405 {{attribute_getter_implemented_in_private_script(attribute)}}
383 {% if attribute.has_setter %} 406 {% if attribute.has_setter %}
384 {{attribute_setter_implemented_in_private_script(attribute)}} 407 {{attribute_setter_implemented_in_private_script(attribute)}}
385 {% endif %} 408 {% endif %}
386 {% endfor %} 409 {% endfor %}
387 {% block partial_interface %}{% endblock %} 410 {% block partial_interface %}{% endblock %}
388 } // namespace blink 411 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/templates/interface.h ('k') | third_party/WebKit/Source/bindings/templates/methods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698