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

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

Issue 793243004: IDL: Properly support [Exposed] on static methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! 5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 {% filter conditional(conditional_string) %} 8 {% filter conditional(conditional_string) %}
9 #include "{{v8_class_or_partial}}.h" 9 #include "{{v8_class_or_partial}}.h"
10 10
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 {% if has_custom_legacy_call_as_function %} 386 {% if has_custom_legacy_call_as_function %}
387 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler({{v8_class}}: :legacyCallCustom); 387 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler({{v8_class}}: :legacyCallCustom);
388 {% endif %} 388 {% endif %}
389 {% if interface_name == 'HTMLAllCollection' %} 389 {% if interface_name == 'HTMLAllCollection' %}
390 {# Needed for legacy support of document.all #} 390 {# Needed for legacy support of document.all #}
391 functionTemplate->InstanceTemplate()->MarkAsUndetectable(); 391 functionTemplate->InstanceTemplate()->MarkAsUndetectable();
392 {% endif %} 392 {% endif %}
393 {% for method in custom_registration_methods %} 393 {% for method in custom_registration_methods %}
394 {# install_custom_signature #} 394 {# install_custom_signature #}
395 {% filter conditional(method.conditional_string) %} 395 {% filter conditional(method.conditional_string) %}
396 {% filter per_context_enabled(method.per_context_enabled_function) %}
397 {% filter exposed(method.exposed_test) %}
396 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all 398 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all
397 if method.overloads else 399 if method.overloads else
398 method.runtime_enabled_function) %} 400 method.runtime_enabled_function) %}
399 {% if method.is_do_not_check_security %} 401 {% if method.is_do_not_check_security %}
400 {{install_do_not_check_security_signature(method) | indent}} 402 {{install_do_not_check_security_signature(method) | indent}}
401 {% else %}{# is_do_not_check_security #} 403 {% else %}{# is_do_not_check_security #}
402 {{install_custom_signature(method) | indent}} 404 {{install_custom_signature(method) | indent}}
403 {% endif %}{# is_do_not_check_security #} 405 {% endif %}{# is_do_not_check_security #}
404 {% endfilter %}{# runtime_enabled() #} 406 {% endfilter %}{# runtime_enabled() #}
407 {% endfilter %}{# exposed() #}
408 {% endfilter %}{# per_context_enabled() #}
405 {% endfilter %}{# conditional() #} 409 {% endfilter %}{# conditional() #}
406 {% endfor %} 410 {% endfor %}
407 {% for attribute in attributes if attribute.is_static %} 411 {% for attribute in attributes if attribute.is_static %}
408 {% set getter_callback = '%sV8Internal::%sAttributeGetterCallback' % 412 {% set getter_callback = '%sV8Internal::%sAttributeGetterCallback' %
409 (cpp_class, attribute.name) %} 413 (cpp_class, attribute.name) %}
410 {% filter conditional(attribute.conditional_string) %} 414 {% filter conditional(attribute.conditional_string) %}
411 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "{{attribute .name}}"), {{getter_callback}}, {{attribute.setter_callback}}, v8::External::New (isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::Acces sorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 415 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "{{attribute .name}}"), {{getter_callback}}, {{attribute.setter_callback}}, v8::External::New (isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::Acces sorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
412 {% endfilter %} 416 {% endfilter %}
413 {% endfor %} 417 {% endfor %}
414 {# Special interfaces #} 418 {# Special interfaces #}
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 {% endfor %} 463 {% endfor %}
460 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 464 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
461 {{attribute_getter_implemented_in_private_script(attribute)}} 465 {{attribute_getter_implemented_in_private_script(attribute)}}
462 {% if not attribute.is_read_only or attribute.put_forwards %} 466 {% if not attribute.is_read_only or attribute.put_forwards %}
463 {{attribute_setter_implemented_in_private_script(attribute)}} 467 {{attribute_setter_implemented_in_private_script(attribute)}}
464 {% endif %} 468 {% endif %}
465 {% endfor %} 469 {% endfor %}
466 {% block partial_interface %}{% endblock %} 470 {% block partial_interface %}{% endblock %}
467 } // namespace blink 471 } // namespace blink
468 {% endfilter %} 472 {% endfilter %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698