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

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

Issue 1322533002: bindings: Supports to change the method location. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed review comments. Created 5 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/templates/interface.cpp ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {% include 'copyright_block.txt' %} 1 {% include 'copyright_block.txt' %}
2 #include "config.h" 2 #include "config.h"
3 {% filter conditional(conditional_string) %} 3 {% filter conditional(conditional_string) %}
4 #include "{{v8_class_or_partial}}.h" 4 #include "{{v8_class_or_partial}}.h"
5 5
6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} 6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %}
7 #include "{{filename}}" 7 #include "{{filename}}"
8 {% endfor %} 8 {% endfor %}
9 9
10 namespace blink { 10 namespace blink {
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 {% if not is_override_builtins %} 420 {% if not is_override_builtins %}
421 flags |= static_cast<int>(v8::PropertyHandlerFlags::kNonMasking); 421 flags |= static_cast<int>(v8::PropertyHandlerFlags::kNonMasking);
422 {% endif %} 422 {% endif %}
423 v8::NamedPropertyHandlerConfiguration config({{named_property_getter_cal lback}}, {{named_property_setter_callback}}, {{named_property_query_callback}}, {{named_property_deleter_callback}}, {{named_property_enumerator_callback}}, v8: :Handle<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(flags)); 423 v8::NamedPropertyHandlerConfiguration config({{named_property_getter_cal lback}}, {{named_property_setter_callback}}, {{named_property_query_callback}}, {{named_property_deleter_callback}}, {{named_property_enumerator_callback}}, v8: :Handle<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(flags));
424 functionTemplate->{{set_on_template}}()->SetHandler(config); 424 functionTemplate->{{set_on_template}}()->SetHandler(config);
425 } 425 }
426 {% endif %} 426 {% endif %}
427 {% if iterator_method %} 427 {% if iterator_method %}
428 {% filter exposed(iterator_method.exposed_test) %} 428 {% filter exposed(iterator_method.exposed_test) %}
429 {% filter runtime_enabled(iterator_method.runtime_enabled_function) %} 429 {% filter runtime_enabled(iterator_method.runtime_enabled_function) %}
430 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIterator Configuration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Internal::i teratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; 430 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIterator Configuration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Internal::i teratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigur ation::OnPrototype };
431 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, v8::DontDelete, symbolKeyedIteratorConfiguration); 431 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, v8::DontDelete, symbolKeyedIteratorConfiguration);
432 {% endfilter %}{# runtime_enabled() #} 432 {% endfilter %}{# runtime_enabled() #}
433 {% endfilter %}{# exposed() #} 433 {% endfilter %}{# exposed() #}
434 {% endif %} 434 {% endif %}
435 {# End special operations #} 435 {# End special operations #}
436 {% if has_custom_legacy_call_as_function %} 436 {% if has_custom_legacy_call_as_function %}
437 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler({{v8_class}}: :legacyCallCustom); 437 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler({{v8_class}}: :legacyCallCustom);
438 {% endif %} 438 {% endif %}
439 {% if interface_name == 'HTMLAllCollection' %} 439 {% if interface_name == 'HTMLAllCollection' %}
440 {# Needed for legacy support of document.all #} 440 {# Needed for legacy support of document.all #}
441 functionTemplate->InstanceTemplate()->MarkAsUndetectable(); 441 functionTemplate->InstanceTemplate()->MarkAsUndetectable();
442 {% endif %} 442 {% endif %}
443 {% for method in custom_registration_methods %} 443 {% for method in custom_registration_methods %}
444 {# install_custom_signature #} 444 {# install_custom_signature #}
445 {% filter conditional(method.conditional_string) %} 445 {% filter conditional(method.conditional_string) %}
446 {% filter exposed(method.overloads.exposed_test_all 446 {% filter exposed(method.overloads.exposed_test_all
447 if method.overloads else 447 if method.overloads else
448 method.exposed_test) %} 448 method.exposed_test) %}
449 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all 449 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all
450 if method.overloads else 450 if method.overloads else
451 method.runtime_enabled_function) %} 451 method.runtime_enabled_function) %}
452 {% if method.is_do_not_check_security %} 452 {% if method.is_do_not_check_security %}
453 {{install_do_not_check_security_signature(method) | indent}} 453 {{install_do_not_check_security_method(method, '', 'instanceTemplate', 'prot otypeTemplate') | indent}}
454 {% else %}{# is_do_not_check_security #} 454 {% else %}{# is_do_not_check_security #}
455 {{install_custom_signature(method) | indent}} 455 {% set signature = 'v8::Local<v8::Signature>()' if method.is_do_not_check_si gnature else 'defaultSignature' %}
456 {{install_custom_signature(method, 'instanceTemplate', 'prototypeTemplate', 'functionTemplate', signature) | indent}}
456 {% endif %}{# is_do_not_check_security #} 457 {% endif %}{# is_do_not_check_security #}
457 {% endfilter %}{# runtime_enabled() #} 458 {% endfilter %}{# runtime_enabled() #}
458 {% endfilter %}{# exposed() #} 459 {% endfilter %}{# exposed() #}
459 {% endfilter %}{# conditional() #} 460 {% endfilter %}{# conditional() #}
460 {% endfor %} 461 {% endfor %}
461 {# Special interfaces #} 462 {# Special interfaces #}
462 {% if not is_partial %} 463 {% if not is_partial %}
463 {% if interface_name == 'Window' %} 464 {% if interface_name == 'Window' %}
464 465
465 prototypeTemplate->SetInternalFieldCount(V8Window::internalFieldCount); 466 prototypeTemplate->SetInternalFieldCount(V8Window::internalFieldCount);
(...skipping 28 matching lines...) Expand all
494 {% endfor %} 495 {% endfor %}
495 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 496 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
496 {{attribute_getter_implemented_in_private_script(attribute)}} 497 {{attribute_getter_implemented_in_private_script(attribute)}}
497 {% if attribute.has_setter %} 498 {% if attribute.has_setter %}
498 {{attribute_setter_implemented_in_private_script(attribute)}} 499 {{attribute_setter_implemented_in_private_script(attribute)}}
499 {% endif %} 500 {% endif %}
500 {% endfor %} 501 {% endfor %}
501 {% block partial_interface %}{% endblock %} 502 {% block partial_interface %}{% endblock %}
502 } // namespace blink 503 } // namespace blink
503 {% endfilter %} 504 {% endfilter %}
OLDNEW
« no previous file with comments | « Source/bindings/templates/interface.cpp ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698