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

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

Issue 1193793003: bindings: Makes almost all attributes accessor-type properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 5 years, 5 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
« no previous file with comments | « Source/bindings/templates/attributes.cpp ('k') | Source/bindings/templates/interface_base.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 %} 100 {% if attribute.is_data_type_property %}
101 static void {{attribute.name}}AttributeGetterCustom(const v8::PropertyCallba ckInfo<v8::Value>&);
102 {% else %}
101 static void {{attribute.name}}AttributeGetterCustom(const v8::FunctionCallba ckInfo<v8::Value>&); 103 static void {{attribute.name}}AttributeGetterCustom(const v8::FunctionCallba ckInfo<v8::Value>&);
102 {% else %}
103 static void {{attribute.name}}AttributeGetterCustom(const v8::PropertyCallba ckInfo<v8::Value>&);
104 {% endif %} 104 {% endif %}
105 {% endfilter %} 105 {% endfilter %}
106 {% endif %} 106 {% endif %}
107 {% if attribute.has_custom_setter %}{# FIXME: and not attribute.implemented_ by #} 107 {% if attribute.has_custom_setter %}{# FIXME: and not attribute.implemented_ by #}
108 {% filter conditional(attribute.conditional_string) %} 108 {% filter conditional(attribute.conditional_string) %}
109 {% if attribute.is_expose_js_accessors %} 109 {% if attribute.is_data_type_property %}
110 static void {{attribute.name}}AttributeSetterCustom(v8::Local<v8::Value>, co nst v8::PropertyCallbackInfo<void>&);
111 {% else %}
110 static void {{attribute.name}}AttributeSetterCustom(v8::Local<v8::Value>, co nst v8::FunctionCallbackInfo<v8::Value>&); 112 static void {{attribute.name}}AttributeSetterCustom(v8::Local<v8::Value>, co nst v8::FunctionCallbackInfo<v8::Value>&);
111 {% else %}
112 static void {{attribute.name}}AttributeSetterCustom(v8::Local<v8::Value>, co nst v8::PropertyCallbackInfo<void>&);
113 {% endif %} 113 {% endif %}
114 {% endfilter %} 114 {% endfilter %}
115 {% endif %} 115 {% endif %}
116 {% endfor %} 116 {% endfor %}
117 {# Custom special operations #} 117 {# Custom special operations #}
118 {% if indexed_property_getter and indexed_property_getter.is_custom %} 118 {% if indexed_property_getter and indexed_property_getter.is_custom %}
119 static void indexedPropertyGetterCustom(uint32_t, const v8::PropertyCallback Info<v8::Value>&); 119 static void indexedPropertyGetterCustom(uint32_t, const v8::PropertyCallback Info<v8::Value>&);
120 {% endif %} 120 {% endif %}
121 {% if indexed_property_setter and indexed_property_setter.is_custom %} 121 {% if indexed_property_setter and indexed_property_setter.is_custom %}
122 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>&);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 {% endif %} 189 {% endif %}
190 template <> 190 template <>
191 struct V8TypeOf<{{cpp_class}}> { 191 struct V8TypeOf<{{cpp_class}}> {
192 typedef {{v8_class}} Type; 192 typedef {{v8_class}} Type;
193 }; 193 };
194 194
195 } // namespace blink 195 } // namespace blink
196 {% endfilter %} 196 {% endfilter %}
197 197
198 #endif // {{v8_class}}_h 198 #endif // {{v8_class}}_h
OLDNEW
« no previous file with comments | « Source/bindings/templates/attributes.cpp ('k') | Source/bindings/templates/interface_base.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698