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

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

Issue 478243002: bindings: Adds virtual ScriptWrappable::wrap method. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 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
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}}.h" 9 #include "{{v8_class}}.h"
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 if is_event_target else '0' %} 43 if is_event_target else '0' %}
44 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class 44 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class
45 if has_visit_dom_wrapper else '0' %} 45 if has_visit_dom_wrapper else '0' %}
46 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface 46 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface
47 if parent_interface else '0' %} 47 if parent_interface else '0' %}
48 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception else 48 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception else
49 'WrapperTypeObjectPrototype' %} 49 'WrapperTypeObjectPrototype' %}
50 50
51 const WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin::kEmbedderBlink, {{v 8_class}}::domTemplate, {{v8_class}}::refObject, {{v8_class}}::derefObject, {{v8 _class}}::createPersistentHandle, {{to_active_dom_object}}, {{to_event_target}}, {{visit_dom_wrapper}}, {{v8_class}}::installConditionallyEnabledMethods, {{v8_c lass}}::installConditionallyEnabledProperties, {{parent_wrapper_type_info}}, Wra pperTypeInfo::{{wrapper_type_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{lifetime}}, WrapperTypeInfo::{{gc_type}} }; 51 const WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin::kEmbedderBlink, {{v 8_class}}::domTemplate, {{v8_class}}::refObject, {{v8_class}}::derefObject, {{v8 _class}}::createPersistentHandle, {{to_active_dom_object}}, {{to_event_target}}, {{visit_dom_wrapper}}, {{v8_class}}::installConditionallyEnabledMethods, {{v8_c lass}}::installConditionallyEnabledProperties, {{parent_wrapper_type_info}}, Wra pperTypeInfo::{{wrapper_type_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{lifetime}}, WrapperTypeInfo::{{gc_type}} };
52 52
53 {% if is_script_wrappable %}
54 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in {{cpp_class} }.h.
55 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
56 // bindings/core/v8/ScriptWrappable.h.
57 const WrapperTypeInfo& {{cpp_class}}::s_wrapperTypeInfo = {{v8_class}}::wrapperT ypeInfo;
58
59 {% endif %}
53 namespace {{cpp_class}}V8Internal { 60 namespace {{cpp_class}}V8Internal {
54 61
55 template <typename T> void V8_USE(T) { } 62 template <typename T> void V8_USE(T) { }
56 63
57 {# Attributes #} 64 {# Attributes #}
58 {% from 'attributes.cpp' import constructor_getter_callback, 65 {% from 'attributes.cpp' import constructor_getter_callback,
59 attribute_getter, attribute_getter_callback, 66 attribute_getter, attribute_getter_callback,
60 attribute_setter, attribute_setter_callback, 67 attribute_setter, attribute_setter_callback,
61 attribute_getter_implemented_in_private_script, 68 attribute_getter_implemented_in_private_script,
62 attribute_setter_implemented_in_private_script 69 attribute_setter_implemented_in_private_script
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 {{method_implemented_in_private_script(method)}} 167 {{method_implemented_in_private_script(method)}}
161 {% endfor %} 168 {% endfor %}
162 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 169 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
163 {{attribute_getter_implemented_in_private_script(attribute)}} 170 {{attribute_getter_implemented_in_private_script(attribute)}}
164 {% if not attribute.is_read_only or attribute.put_forwards %} 171 {% if not attribute.is_read_only or attribute.put_forwards %}
165 {{attribute_setter_implemented_in_private_script(attribute)}} 172 {{attribute_setter_implemented_in_private_script(attribute)}}
166 {% endif %} 173 {% endif %}
167 {% endfor %} 174 {% endfor %}
168 } // namespace blink 175 } // namespace blink
169 {% endfilter %} 176 {% endfilter %}
OLDNEW
« no previous file with comments | « Source/bindings/templates/interface.h ('k') | Source/bindings/tests/results/V8SVGTestInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698