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

Side by Side Diff: Source/bindings/templates/interface.h

Issue 1185843010: bindings: Moves custom getters/setters to the prototype chain. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 5 years, 6 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 {% include 'copyright_block.txt' %} 1 {% include 'copyright_block.txt' %}
2 #ifndef {{v8_class}}_h 2 #ifndef {{v8_class}}_h
3 #define {{v8_class}}_h 3 #define {{v8_class}}_h
4 4
5 {% filter conditional(conditional_string) %} 5 {% filter conditional(conditional_string) %}
6 {% for filename in header_includes %} 6 {% for filename in header_includes %}
7 #include "{{filename}}" 7 #include "{{filename}}"
8 {% endfor %} 8 {% endfor %}
9 9
10 namespace blink { 10 namespace blink {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 {% endfor %} 90 {% endfor %}
91 {% if constructors or has_custom_constructor or has_event_constructor %} 91 {% if constructors or has_custom_constructor or has_event_constructor %}
92 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&); 92 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
93 {% endif %} 93 {% endif %}
94 {% if has_custom_constructor %} 94 {% if has_custom_constructor %}
95 static void constructorCustom(const v8::FunctionCallbackInfo<v8::Value>&); 95 static void constructorCustom(const v8::FunctionCallbackInfo<v8::Value>&);
96 {% endif %} 96 {% endif %}
97 {% for attribute in attributes %} 97 {% for attribute in attributes %}
98 {% if attribute.has_custom_getter %}{# FIXME: and not attribute.implemented_ by #} 98 {% if attribute.has_custom_getter %}{# FIXME: and not attribute.implemented_ by #}
99 {% filter conditional(attribute.conditional_string) %} 99 {% filter conditional(attribute.conditional_string) %}
100 {% if attribute.is_expose_js_accessors %}
101 static void {{attribute.name}}AttributeGetterCustom(const v8::FunctionCallba ckInfo<v8::Value>&);
102 {% else %}
100 static void {{attribute.name}}AttributeGetterCustom(const v8::PropertyCallba ckInfo<v8::Value>&); 103 static void {{attribute.name}}AttributeGetterCustom(const v8::PropertyCallba ckInfo<v8::Value>&);
104 {% endif %}
101 {% endfilter %} 105 {% endfilter %}
102 {% endif %} 106 {% endif %}
103 {% if attribute.has_custom_setter %}{# FIXME: and not attribute.implemented_ by #} 107 {% if attribute.has_custom_setter %}{# FIXME: and not attribute.implemented_ by #}
104 {% filter conditional(attribute.conditional_string) %} 108 {% filter conditional(attribute.conditional_string) %}
109 {% if attribute.is_expose_js_accessors %}
110 static void {{attribute.name}}AttributeSetterCustom(v8::Local<v8::Value>, co nst v8::FunctionCallbackInfo<v8::Value>&);
111 {% else %}
105 static void {{attribute.name}}AttributeSetterCustom(v8::Local<v8::Value>, co nst v8::PropertyCallbackInfo<void>&); 112 static void {{attribute.name}}AttributeSetterCustom(v8::Local<v8::Value>, co nst v8::PropertyCallbackInfo<void>&);
113 {% endif %}
106 {% endfilter %} 114 {% endfilter %}
107 {% endif %} 115 {% endif %}
108 {% endfor %} 116 {% endfor %}
109 {# Custom special operations #} 117 {# Custom special operations #}
110 {% if indexed_property_getter and indexed_property_getter.is_custom %} 118 {% if indexed_property_getter and indexed_property_getter.is_custom %}
111 static void indexedPropertyGetterCustom(uint32_t, const v8::PropertyCallback Info<v8::Value>&); 119 static void indexedPropertyGetterCustom(uint32_t, const v8::PropertyCallback Info<v8::Value>&);
112 {% endif %} 120 {% endif %}
113 {% if indexed_property_setter and indexed_property_setter.is_custom %} 121 {% if indexed_property_setter and indexed_property_setter.is_custom %}
114 static void indexedPropertySetterCustom(uint32_t, v8::Local<v8::Value>, cons t v8::PropertyCallbackInfo<v8::Value>&); 122 static void indexedPropertySetterCustom(uint32_t, v8::Local<v8::Value>, cons t v8::PropertyCallbackInfo<v8::Value>&);
115 {% endif %} 123 {% endif %}
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 {% endif %} 189 {% endif %}
182 template <> 190 template <>
183 struct V8TypeOf<{{cpp_class}}> { 191 struct V8TypeOf<{{cpp_class}}> {
184 typedef {{v8_class}} Type; 192 typedef {{v8_class}} Type;
185 }; 193 };
186 194
187 } // namespace blink 195 } // namespace blink
188 {% endfilter %} 196 {% endfilter %}
189 197
190 #endif // {{v8_class}}_h 198 #endif // {{v8_class}}_h
OLDNEW
« no previous file with comments | « Source/bindings/scripts/v8_utilities.py ('k') | Source/bindings/tests/results/core/V8TestObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698