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

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

Issue 2207423002: Implement '[SecureContext]' IDL attribute for interfaces, methods and attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback. Created 4 years, 4 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 {%- if has_access_check_callbacks and not is_partial %}{{newline}} 290 {%- if has_access_check_callbacks and not is_partial %}{{newline}}
291 // Cross-origin access check 291 // Cross-origin access check
292 instanceTemplate->SetAccessCheckCallback({{cpp_class}}V8Internal::securityCh eck, v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&{{v8_class}}::wrap perTypeInfo))); 292 instanceTemplate->SetAccessCheckCallback({{cpp_class}}V8Internal::securityCh eck, v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&{{v8_class}}::wrap perTypeInfo)));
293 {% endif %} 293 {% endif %}
294 294
295 {%- if has_array_iterator and not is_partial and not is_global %}{{newline}} 295 {%- if has_array_iterator and not is_partial and not is_global %}{{newline}}
296 // Array iterator 296 // Array iterator
297 prototypeTemplate->SetIntrinsicDataProperty(v8::Symbol::GetIterator(isolate) , v8::kArrayProto_values, v8::DontEnum); 297 prototypeTemplate->SetIntrinsicDataProperty(v8::Symbol::GetIterator(isolate) , v8::kArrayProto_values, v8::DontEnum);
298 {% endif %} 298 {% endif %}
299 299
300 {%- for group in attributes | runtime_enabled_attributes | groupby('runtime_ feature_name') %}{{newline}} 300 {%- for group in attributes | purely_runtime_enabled_attributes | groupby('r untime_feature_name') %}{{newline}}
301 if ({{group.list[0].runtime_enabled_function}}()) { 301 if ({{group.list[0].runtime_enabled_function}}()) {
302 {% for attribute in group.list | unique_by('name') | sort %} 302 {% for attribute in group.list | unique_by('name') | sort %}
303 {% if attribute.is_data_type_property %} 303 {% if attribute.is_data_type_property %}
304 const V8DOMConfiguration::AttributeConfiguration attribute{{attribute.na me}}Configuration = \ 304 const V8DOMConfiguration::AttributeConfiguration attribute{{attribute.na me}}Configuration = \
305 {{attribute_configuration(attribute)}}; 305 {{attribute_configuration(attribute)}};
306 V8DOMConfiguration::installAttribute(isolate, world, instanceTemplate, p rototypeTemplate, attribute{{attribute.name}}Configuration); 306 V8DOMConfiguration::installAttribute(isolate, world, instanceTemplate, p rototypeTemplate, attribute{{attribute.name}}Configuration);
307 {% else %} 307 {% else %}
308 const V8DOMConfiguration::AccessorConfiguration accessor{{attribute.name }}Configuration = \ 308 const V8DOMConfiguration::AccessorConfiguration accessor{{attribute.name }}Configuration = \
309 {{attribute_configuration(attribute)}}; 309 {{attribute_configuration(attribute)}};
310 V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, pr ototypeTemplate, interfaceTemplate, signature, accessor{{attribute.name}}Configu ration); 310 V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, pr ototypeTemplate, interfaceTemplate, signature, accessor{{attribute.name}}Configu ration);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 {{method_implemented_in_private_script(method)}} 430 {{method_implemented_in_private_script(method)}}
431 {% endfor %} 431 {% endfor %}
432 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 432 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
433 {{attribute_getter_implemented_in_private_script(attribute)}} 433 {{attribute_getter_implemented_in_private_script(attribute)}}
434 {% if attribute.has_setter %} 434 {% if attribute.has_setter %}
435 {{attribute_setter_implemented_in_private_script(attribute)}} 435 {{attribute_setter_implemented_in_private_script(attribute)}}
436 {% endif %} 436 {% endif %}
437 {% endfor %} 437 {% endfor %}
438 {% block partial_interface %}{% endblock %} 438 {% block partial_interface %}{% endblock %}
439 } // namespace blink 439 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/templates/interface.cpp ('k') | third_party/WebKit/Source/bindings/templates/methods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698