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

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

Issue 2730183003: bindings: Add C++ versions of WebIDL types and generalize NativeValueTraits. (Closed)
Patch Set: Move specialization for SerializedScriptValue to the appropriate header Created 3 years, 9 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 private: 266 private:
267 static InstallTemplateFunction install{{v8_class}}TemplateFunction; 267 static InstallTemplateFunction install{{v8_class}}TemplateFunction;
268 {% endif %} 268 {% endif %}
269 }; 269 };
270 270
271 {% if has_event_constructor %} 271 {% if has_event_constructor %}
272 {{exported}}bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionState&, const v8::FunctionCallbackInfo<v8::Value>& info); 272 {{exported}}bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionState&, const v8::FunctionCallbackInfo<v8::Value>& info);
273 273
274 {% endif %} 274 {% endif %}
275 template <> 275 template <>
276 struct NativeValueTraits<{{cpp_class}}> : public NativeValueTraitsBase<{{cpp_cla ss}}> {
277 {{exported}}static {{cpp_class}}* nativeValue(v8::Isolate*, v8::Local<v8::Valu e>, ExceptionState&);
278 };
279
280 template <>
276 struct V8TypeOf<{{cpp_class}}> { 281 struct V8TypeOf<{{cpp_class}}> {
277 typedef {{v8_class}} Type; 282 typedef {{v8_class}} Type;
278 }; 283 };
279 284
280 } // namespace blink 285 } // namespace blink
281 286
282 #endif // {{v8_class}}_h 287 #endif // {{v8_class}}_h
283 288
284 {% endfilter %}{# format_blink_cpp_source_code #} 289 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698