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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/interface.h.tmpl

Issue 2653883006: [bindings] Move callback functions from V8FooInternal namespace to V8Foo class (Closed)
Patch Set: Revert expose change Created 3 years, 10 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
OLDNEW
1 {% filter format_blink_cpp_source_code %} 1 {% filter format_blink_cpp_source_code %}
2 2
3 {% include 'copyright_block.txt' %} 3 {% include 'copyright_block.txt' %}
4 #ifndef {{v8_class}}_h 4 #ifndef {{v8_class}}_h
5 #define {{v8_class}}_h 5 #define {{v8_class}}_h
6 6
7 {% for filename in header_includes %} 7 {% for filename in header_includes %}
8 #include "{{filename}}" 8 #include "{{filename}}"
9 {% endfor %} 9 {% endfor %}
10 10
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 {% endif %} 159 {% endif %}
160 160
161 {% for feature in origin_trial_features %} 161 {% for feature in origin_trial_features %}
162 162
163 static void install{{feature.name}}(v8::Isolate*, const DOMWrapperWorld&, v8:: Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Funct ion> interface); 163 static void install{{feature.name}}(v8::Isolate*, const DOMWrapperWorld&, v8:: Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Funct ion> interface);
164 static void install{{feature.name}}(ScriptState*, v8::Local<v8::Object> instan ce); 164 static void install{{feature.name}}(ScriptState*, v8::Local<v8::Object> instan ce);
165 {% if not feature.needs_instance %} 165 {% if not feature.needs_instance %}
166 static void install{{feature.name}}(ScriptState*); 166 static void install{{feature.name}}(ScriptState*);
167 {% endif %} 167 {% endif %}
168 {% endfor %} 168 {% endfor %}
169
170 // Callback functions
171 {% for constant in constants | has_special_getter %}
172 {{exported}}static void {{constant.name}}ConstantGetterCallback(v8::Local<v8:: Name>, const v8::PropertyCallbackInfo<v8::Value>&);
173 {% endfor %}
174
175 {% for attribute in attributes %}
176 {% if attribute.is_cached_accessor %}
177 {{exported}}static v8::Local<v8::Private> {{attribute.name}}CachedAccessorCall back(v8::Isolate*);
178 {% endif %}
179 {% for world_suffix in attribute.world_suffixes %}
180 {% if not attribute.constructor_type %}
181 {{exported}}static void {{attribute.name}}AttributeGetterCallback{{world_suffi x}}(
182 {%- if attribute.is_data_type_property -%}
183 v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&
184 {%- else -%}
185 const v8::FunctionCallbackInfo<v8::Value>&
186 {%- endif -%});
187 {% elif attribute.needs_constructor_getter_callback %}
188 {{exported}}static void {{attribute.name}}ConstructorGetterCallback{{world_suf fix}}(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&);
189 {% endif %}
190 {% if attribute.has_setter %}
191 {{exported}}static void {{attribute.name}}AttributeSetterCallback{{world_suffi x}}(
192 {%- if attribute.is_data_type_property -%}
193 v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<vo id>&
194 {%- else -%}
195 const v8::FunctionCallbackInfo<v8::Value>&
196 {%- endif -%});
197 {% endif %}
198 {% endfor %}
199 {% endfor %}
200
201 {% for method in methods %}
202 {% for world_suffix in method.world_suffixes %}
203 {% if not method.overload_index or method.overloads %}
204 {# Document about the following condition: #}
205 {# https://docs.google.com/document/d/1qBC7Therp437Jbt_QYAtNYMZs6zQ_7_tnMkNUG_ ACqs/edit?usp=sharing #}
206 {% if (method.overloads and method.overloads.visible and
207 (not method.overloads.has_partial_overloads or not is_partial)) or
208 (not method.overloads and method.visible) %}
209 {# A single callback is generated for overloaded methods #}
210 {# with considering partial overloads #}
211 {{exported}}static void {{method.name}}MethodCallback{{world_suffix}}(const v8 ::FunctionCallbackInfo<v8::Value>&);
212 {% endif %}
213 {% endif %}
214 {% if method.is_cross_origin and method.visible %}
215 {{exported}}static void {{method.name}}OriginSafeMethodGetterCallback{{world_s uffix}}(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&);
216 {% endif %}
217 {% endfor %}
218 {% endfor %}
219 {% if iterator_method %}
220 {{exported}}static void {{iterator_method.name}}MethodCallback(const v8::Funct ionCallbackInfo<v8::Value>&);
221 {% endif %}
222 {% if has_origin_safe_method_setter %}
223 {{exported}}static void {{cpp_class}}OriginSafeMethodSetterCallback(v8::Local< v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&);
224 {% endif %}
225
226 {% if has_access_check_callbacks and not is_partial %}
227 {{exported}}static bool securityCheck(v8::Local<v8::Context>, v8::Local<v8::Ob ject>, v8::Local<v8::Value>);
228 {% if has_cross_origin_named_getter %}
229 {{exported}}static void crossOriginNamedGetter(v8::Local<v8::Name>, const v8:: PropertyCallbackInfo<v8::Value>&);
230 {% endif %}
231 {% if has_cross_origin_named_setter %}
232 {{exported}}static void crossOriginNamedSetter(v8::Local<v8::Name>, v8::Local< v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
233 {% endif %}
234 {% if has_cross_origin_named_enumerator %}
235 {{exported}}static void crossOriginNamedEnumerator(const v8::PropertyCallbackI nfo<v8::Array>&);
236 {% endif %}
237 {% if has_cross_origin_indexed_getter %}
238 {{exported}}static void crossOriginIndexedGetter(uint32_t index, const v8::Pro pertyCallbackInfo<v8::Value>&);
239 {% endif %}
240 {% endif %}
241
242 {% if named_property_getter %}
243 {{exported}}static void namedPropertyGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&);
244 {% endif %}
245 {% if named_property_setter %}
246 {{exported}}static void namedPropertySetterCallback(v8::Local<v8::Name>, v8::L ocal<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
247 {% endif %}
248 {% if named_property_deleter %}
249 {{exported}}static void namedPropertyDeleterCallback(v8::Local<v8::Name>, cons t v8::PropertyCallbackInfo<v8::Boolean>&);
250 {% endif %}
251 {% if named_property_getter and named_property_getter.is_enumerable %}
252 {{exported}}static void namedPropertyQueryCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Integer>&);
253 {% endif %}
254 {% if named_property_getter and named_property_getter.is_enumerable %}
255 {{exported}}static void namedPropertyEnumeratorCallback(const v8::PropertyCall backInfo<v8::Array>&);
256 {% endif %}
257 {% if indexed_property_getter or named_property_getter %}
258 {{exported}}static void indexedPropertyGetterCallback(uint32_t index, const v8 ::PropertyCallbackInfo<v8::Value>&);
259 {% endif %}
260 {% if indexed_property_setter or named_property_setter %}
261 {{exported}}static void indexedPropertySetterCallback(uint32_t index, v8::Loca l<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
262 {% endif %}
263 {% if indexed_property_deleter or named_property_deleter %}
264 {{exported}}static void indexedPropertyDeleterCallback(uint32_t index, const v 8::PropertyCallbackInfo<v8::Boolean>&);
265 {% endif %}
266
169 {% if has_partial_interface %} 267 {% if has_partial_interface %}
170
171 private: 268 private:
172 static InstallTemplateFunction install{{v8_class}}TemplateFunction; 269 static InstallTemplateFunction install{{v8_class}}TemplateFunction;
173 {% endif %} 270 {% endif %}
174 }; 271 };
175 272
176 {% if has_event_constructor %} 273 {% if has_event_constructor %}
177 {{exported}}bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionState&, const v8::FunctionCallbackInfo<v8::Value>& info); 274 {{exported}}bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionState&, const v8::FunctionCallbackInfo<v8::Value>& info);
178 275
179 {% endif %} 276 {% endif %}
180 template <> 277 template <>
181 struct V8TypeOf<{{cpp_class}}> { 278 struct V8TypeOf<{{cpp_class}}> {
182 typedef {{v8_class}} Type; 279 typedef {{v8_class}} Type;
183 }; 280 };
184 281
185 } // namespace blink 282 } // namespace blink
186 283
187 #endif // {{v8_class}}_h 284 #endif // {{v8_class}}_h
188 285
189 {% endfilter %}{# format_blink_cpp_source_code #} 286 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698