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

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

Issue 1386843002: bindings: Implements the named properties object (WindowProperties). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/bindings/templates/interface.cpp ('k') | no next file » | 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 {% endif %} 291 {% endif %}
292 { 292 {
293 {% if is_partial %} 293 {% if is_partial %}
294 {{v8_class}}::install{{v8_class}}Template(functionTemplate, isolate); 294 {{v8_class}}::install{{v8_class}}Template(functionTemplate, isolate);
295 {% else %} 295 {% else %}
296 functionTemplate->ReadOnlyPrototype(); 296 functionTemplate->ReadOnlyPrototype();
297 {% endif %} 297 {% endif %}
298 298
299 v8::Local<v8::Signature> defaultSignature; 299 v8::Local<v8::Signature> defaultSignature;
300 {% set parent_template = 300 {% set parent_template =
301 '%s::domTemplateForNamedPropertiesObject(isolate)' % v8_class
302 if has_named_properties_object else
301 'V8%s::domTemplate(isolate)' % parent_interface 303 'V8%s::domTemplate(isolate)' % parent_interface
302 if parent_interface else 'v8::Local<v8::FunctionTemplate>()' %} 304 if parent_interface else 'v8::Local<v8::FunctionTemplate>()' %}
303 {% if runtime_enabled_function %} 305 {% if runtime_enabled_function %}
304 if (!{{runtime_enabled_function}}()) 306 if (!{{runtime_enabled_function}}())
305 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "{{interface_name}}", {{parent_template}}, {{v8_class}}::inter nalFieldCount, 0, 0, 0, 0, 0, 0); 307 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "{{interface_name}}", {{parent_template}}, {{v8_class}}::inter nalFieldCount, 0, 0, 0, 0, 0, 0);
306 else 308 else
307 {% endif %} 309 {% endif %}
308 {% set runtime_enabled_indent = 4 if runtime_enabled_function else 0 %} 310 {% set runtime_enabled_indent = 4 if runtime_enabled_function else 0 %}
309 {% filter indent(runtime_enabled_indent, true) %} 311 {% filter indent(runtime_enabled_indent, true) %}
310 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "{{interface_name}}", {{parent_template}}, {{v8_class}}::internalF ieldCount, 312 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "{{interface_name}}", {{parent_template}}, {{v8_class}}::internalF ieldCount,
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 476
475 // Custom toString template 477 // Custom toString template
476 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); 478 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
477 {% endif %} 479 {% endif %}
478 } 480 }
479 481
480 {% endif %}{# not is_array_buffer_or_view #} 482 {% endif %}{# not is_array_buffer_or_view #}
481 {% endblock %} 483 {% endblock %}
482 {##############################################################################} 484 {##############################################################################}
483 {% block get_dom_template %}{% endblock %} 485 {% block get_dom_template %}{% endblock %}
486 {% block get_dom_template_for_named_properties_object %}{% endblock %}
484 {% block has_instance %}{% endblock %} 487 {% block has_instance %}{% endblock %}
485 {% block to_impl %}{% endblock %} 488 {% block to_impl %}{% endblock %}
486 {% block to_impl_with_type_check %}{% endblock %} 489 {% block to_impl_with_type_check %}{% endblock %}
487 {% block install_conditional_attributes %}{% endblock %} 490 {% block install_conditional_attributes %}{% endblock %}
488 {##############################################################################} 491 {##############################################################################}
489 {% block prepare_prototype_and_interface_object %}{% endblock %} 492 {% block prepare_prototype_and_interface_object %}{% endblock %}
490 {##############################################################################} 493 {##############################################################################}
491 {% block to_active_dom_object %}{% endblock %} 494 {% block to_active_dom_object %}{% endblock %}
492 {% block ref_object_and_deref_object %}{% endblock %} 495 {% block ref_object_and_deref_object %}{% endblock %}
493 {% for method in methods if method.is_implemented_in_private_script and method.v isible %} 496 {% for method in methods if method.is_implemented_in_private_script and method.v isible %}
494 {{method_implemented_in_private_script(method)}} 497 {{method_implemented_in_private_script(method)}}
495 {% endfor %} 498 {% endfor %}
496 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 499 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
497 {{attribute_getter_implemented_in_private_script(attribute)}} 500 {{attribute_getter_implemented_in_private_script(attribute)}}
498 {% if attribute.has_setter %} 501 {% if attribute.has_setter %}
499 {{attribute_setter_implemented_in_private_script(attribute)}} 502 {{attribute_setter_implemented_in_private_script(attribute)}}
500 {% endif %} 503 {% endif %}
501 {% endfor %} 504 {% endfor %}
502 {% block partial_interface %}{% endblock %} 505 {% block partial_interface %}{% endblock %}
503 } // namespace blink 506 } // namespace blink
504 {% endfilter %} 507 {% endfilter %}
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/templates/interface.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698