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

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 and sent out to the code review. 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}}, {{w rapper_type_prototype}}, {{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}}, {{w rapper_type_prototype}}, {{gc_type}} };
52 52
53 {% if is_script_wrappable %}
54 // The definition of {{cpp_class}}'s WrapperTypeInfo. If {{cpp_class}} inherits
55 // from ScriptWrappable, you have to write DEFINE_WRAPPERTYPEINFO macro in the
56 // class definition. Otherwise, you have to write NotScriptWrappable in the IDL
haraken 2014/08/29 05:24:04 NotScriptWrappable => [NotScriptWrappable]
Yuki 2014/09/01 06:06:39 Done.
57 // file as an extended attribute in order to let IDL compiler know that
58 // {{cpp_class}} doesn't inherit from ScriptWrappable. Note that
59 // NotScriptWrappable is inheritable.
haraken 2014/08/29 05:24:04 Ditto.
Yuki 2014/09/01 06:06:39 Done.
60 const WrapperTypeInfo& {{cpp_class}}::s_wrapperTypeInfo = {{v8_class}}::wrapperT ypeInfo;
61
62 {% endif %}
53 namespace {{cpp_class}}V8Internal { 63 namespace {{cpp_class}}V8Internal {
54 64
55 template <typename T> void V8_USE(T) { } 65 template <typename T> void V8_USE(T) { }
56 66
57 {# Attributes #} 67 {# Attributes #}
58 {% from 'attributes.cpp' import constructor_getter_callback, 68 {% from 'attributes.cpp' import constructor_getter_callback,
59 attribute_getter, attribute_getter_callback, 69 attribute_getter, attribute_getter_callback,
60 attribute_setter, attribute_setter_callback, 70 attribute_setter, attribute_setter_callback,
61 attribute_getter_implemented_in_private_script, 71 attribute_getter_implemented_in_private_script,
62 attribute_setter_implemented_in_private_script 72 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)}} 170 {{method_implemented_in_private_script(method)}}
161 {% endfor %} 171 {% endfor %}
162 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 172 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
163 {{attribute_getter_implemented_in_private_script(attribute)}} 173 {{attribute_getter_implemented_in_private_script(attribute)}}
164 {% if not attribute.is_read_only or attribute.put_forwards %} 174 {% if not attribute.is_read_only or attribute.put_forwards %}
165 {{attribute_setter_implemented_in_private_script(attribute)}} 175 {{attribute_setter_implemented_in_private_script(attribute)}}
166 {% endif %} 176 {% endif %}
167 {% endfor %} 177 {% endfor %}
168 } // namespace blink 178 } // namespace blink
169 {% endfilter %} 179 {% endfilter %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698