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

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

Issue 725163002: bindings: Retires V8T::toEventTarget and reduces the binary size. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Made bitfields be type of unsigned to support both of MSVC and Android. Created 6 years, 1 month 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
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
11 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} 11 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %}
12 #include "{{filename}}" 12 #include "{{filename}}"
13 {% endfor %} 13 {% endfor %}
14 14
15 namespace blink { 15 namespace blink {
16 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class 16 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class
17 if is_active_dom_object else '0' %} 17 if is_active_dom_object else '0' %}
18 {% set to_event_target = '%s::toEventTarget' % v8_class
19 if is_event_target else '0' %}
20 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class 18 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class
21 if has_visit_dom_wrapper else '0' %} 19 if has_visit_dom_wrapper else '0' %}
22 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface 20 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface
23 if parent_interface else '0' %} 21 if parent_interface else '0' %}
24 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception else 22 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception else
25 'WrapperTypeObjectPrototype' %} 23 'WrapperTypeObjectPrototype' %}
26 {% set dom_template = '%s::domTemplate' % v8_class if not is_array_buffer_or_vie w else '0' %} 24 {% set dom_template = '%s::domTemplate' % v8_class if not is_array_buffer_or_vie w else '0' %}
27 25
28 {% set wrapper_type_info_const = '' if has_partial_interface else 'const ' %} 26 {% set wrapper_type_info_const = '' if has_partial_interface else 'const ' %}
29 {% if not is_partial %} 27 {% if not is_partial %}
30 {{wrapper_type_info_const}}WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin ::kEmbedderBlink, {{dom_template}}, {{v8_class}}::refObject, {{v8_class}}::deref Object, {{v8_class}}::trace, {{to_active_dom_object}}, {{to_event_target}}, {{vi sit_dom_wrapper}}, {{v8_class}}::installConditionallyEnabledMethods, {{v8_class} }::installConditionallyEnabledProperties, {{parent_wrapper_type_info}}, WrapperT ypeInfo::{{wrapper_type_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, Wrap perTypeInfo::{{lifetime}}, WrapperTypeInfo::{{gc_type}} }; 28 {{wrapper_type_info_const}}WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin ::kEmbedderBlink, {{dom_template}}, {{v8_class}}::refObject, {{v8_class}}::deref Object, {{v8_class}}::trace, {{to_active_dom_object}}, {{visit_dom_wrapper}}, {{ v8_class}}::installConditionallyEnabledMethods, {{v8_class}}::installConditional lyEnabledProperties, {{parent_wrapper_type_info}}, WrapperTypeInfo::{{wrapper_ty pe_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{event_ target_inheritance}}, WrapperTypeInfo::{{lifetime}}, WrapperTypeInfo::{{gc_type} } };
31 29
32 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in {{cpp_class} }.h. 30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in {{cpp_class} }.h.
33 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 31 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
34 // bindings/core/v8/ScriptWrappable.h. 32 // bindings/core/v8/ScriptWrappable.h.
35 {% if is_typed_array_type %} 33 {% if is_typed_array_type %}
36 template<> 34 template<>
37 {% endif %} 35 {% endif %}
38 const WrapperTypeInfo& {{cpp_class}}::s_wrapperTypeInfo = {{v8_class}}::wrapperT ypeInfo; 36 const WrapperTypeInfo& {{cpp_class}}::s_wrapperTypeInfo = {{v8_class}}::wrapperT ypeInfo;
39 37
40 {% endif %} 38 {% endif %}
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 {% block install_conditional_methods %} 443 {% block install_conditional_methods %}
446 {% from 'methods.cpp' import install_conditionally_enabled_methods 444 {% from 'methods.cpp' import install_conditionally_enabled_methods
447 with context %} 445 with context %}
448 {% if is_partial or conditionally_enabled_methods %} 446 {% if is_partial or conditionally_enabled_methods %}
449 {{install_conditionally_enabled_methods()}} 447 {{install_conditionally_enabled_methods()}}
450 448
451 {% endif %} 449 {% endif %}
452 {% endblock %} 450 {% endblock %}
453 {##############################################################################} 451 {##############################################################################}
454 {% block to_active_dom_object %}{% endblock %} 452 {% block to_active_dom_object %}{% endblock %}
455 {% block to_event_target %}{% endblock %}
456 {% block get_shadow_object_template %}{% endblock %} 453 {% block get_shadow_object_template %}{% endblock %}
457 {% block deref_object_and_to_v8_no_inline %}{% endblock %} 454 {% block deref_object_and_to_v8_no_inline %}{% endblock %}
458 {% for method in methods if method.is_implemented_in_private_script %} 455 {% for method in methods if method.is_implemented_in_private_script %}
459 {{method_implemented_in_private_script(method)}} 456 {{method_implemented_in_private_script(method)}}
460 {% endfor %} 457 {% endfor %}
461 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 458 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
462 {{attribute_getter_implemented_in_private_script(attribute)}} 459 {{attribute_getter_implemented_in_private_script(attribute)}}
463 {% if not attribute.is_read_only or attribute.put_forwards %} 460 {% if not attribute.is_read_only or attribute.put_forwards %}
464 {{attribute_setter_implemented_in_private_script(attribute)}} 461 {{attribute_setter_implemented_in_private_script(attribute)}}
465 {% endif %} 462 {% endif %}
466 {% endfor %} 463 {% endfor %}
467 {% block partial_interface %}{% endblock %} 464 {% block partial_interface %}{% endblock %}
468 } // namespace blink 465 } // namespace blink
469 {% endfilter %} 466 {% endfilter %}
OLDNEW
« no previous file with comments | « Source/bindings/templates/interface.cpp ('k') | Source/bindings/tests/results/core/V8ArrayBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698