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

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

Issue 721383003: bindings: Retires ScriptWrappableBase mostly. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 {% block initialize_script_wrappable %}{% endblock %}
16 namespace blink { 15 namespace blink {
17 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class 16 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class
18 if is_active_dom_object else '0' %} 17 if is_active_dom_object else '0' %}
19 {% set to_event_target = '%s::toEventTarget' % v8_class 18 {% set to_event_target = '%s::toEventTarget' % v8_class
20 if is_event_target else '0' %} 19 if is_event_target else '0' %}
21 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class 20 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class
22 if has_visit_dom_wrapper else '0' %} 21 if has_visit_dom_wrapper else '0' %}
23 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface 22 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface
24 if parent_interface else '0' %} 23 if parent_interface else '0' %}
25 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception else 24 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception else
26 'WrapperTypeObjectPrototype' %} 25 'WrapperTypeObjectPrototype' %}
27 {% set dom_template = '%s::domTemplate' % v8_class if not is_array_buffer_or_vie w else '0' %} 26 {% set dom_template = '%s::domTemplate' % v8_class if not is_array_buffer_or_vie w else '0' %}
28 27
29 {% set wrapper_type_info_const = '' if has_partial_interface else 'const ' %} 28 {% set wrapper_type_info_const = '' if has_partial_interface else 'const ' %}
30 {% if not is_partial %} 29 {% if not is_partial %}
31 {{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}} }; 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}} };
32 31
33 {% if is_script_wrappable %}
34 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in {{cpp_class} }.h. 32 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in {{cpp_class} }.h.
35 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 33 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
36 // bindings/core/v8/ScriptWrappable.h. 34 // bindings/core/v8/ScriptWrappable.h.
37 {% if is_typed_array_type %} 35 {% if is_typed_array_type %}
38 template<> 36 template<>
39 {% endif %} 37 {% endif %}
40 const WrapperTypeInfo& {{cpp_class}}::s_wrapperTypeInfo = {{v8_class}}::wrapperT ypeInfo; 38 const WrapperTypeInfo& {{cpp_class}}::s_wrapperTypeInfo = {{v8_class}}::wrapperT ypeInfo;
41 39
42 {% endif %} 40 {% endif %}
43 {% endif %}
44 {% if not is_array_buffer_or_view %} 41 {% if not is_array_buffer_or_view %}
45 namespace {{cpp_class_or_partial}}V8Internal { 42 namespace {{cpp_class_or_partial}}V8Internal {
46 {% if has_partial_interface %} 43 {% if has_partial_interface %}
47 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %} 44 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %}
48 static void (*{{method.name}}MethodForPartialInterface)(const v8::FunctionCallba ckInfo<v8::Value>&) = 0; 45 static void (*{{method.name}}MethodForPartialInterface)(const v8::FunctionCallba ckInfo<v8::Value>&) = 0;
49 {% endfor %} 46 {% endfor %}
50 {% endif %} 47 {% endif %}
51 48
52 {# Constants #} 49 {# Constants #}
53 {% from 'constants.cpp' import constant_getter_callback 50 {% from 'constants.cpp' import constant_getter_callback
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 {% endfor %} 460 {% endfor %}
464 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 461 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
465 {{attribute_getter_implemented_in_private_script(attribute)}} 462 {{attribute_getter_implemented_in_private_script(attribute)}}
466 {% if not attribute.is_read_only or attribute.put_forwards %} 463 {% if not attribute.is_read_only or attribute.put_forwards %}
467 {{attribute_setter_implemented_in_private_script(attribute)}} 464 {{attribute_setter_implemented_in_private_script(attribute)}}
468 {% endif %} 465 {% endif %}
469 {% endfor %} 466 {% endfor %}
470 {% block partial_interface %}{% endblock %} 467 {% block partial_interface %}{% endblock %}
471 } // namespace blink 468 } // namespace blink
472 {% endfilter %} 469 {% endfilter %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698