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

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: Clean up 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}}(v8::Isolate* isolate, con st DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Functio n> interface)
haraken 2016/05/27 00:01:42 Sorry, I got lost. Who calls the install methods?
iclelland 2016/05/27 03:19:43 These are called by the installOriginTrialsFor{Cor
haraken 2016/05/27 22:25:17 installOriginTrialsForCore doesn't call any instal
iclelland 2016/05/30 12:15:35 Yes, that's correct. Currently, the only origin tr
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698