Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / bindings / templates / dictionary_v8.h
blob7eb47ade1796abfbfa12c189109df8774e2cdd85
1 {% include 'copyright_block.txt' %}
2 #ifndef {{v8_original_class}}_h
3 #define {{v8_original_class}}_h
5 {% for filename in header_includes %}
6 #include "{{filename}}"
7 {% endfor %}
9 namespace blink {
11 class ExceptionState;
13 class {{v8_class}} {
14 public:
15 {{exported}}static void toImpl(v8::Isolate*, v8::Local<v8::Value>, {{cpp_class}}&, ExceptionState&);
18 v8::Local<v8::Value> toV8(const {{cpp_class}}&, v8::Local<v8::Object>, v8::Isolate*);
19 {{exported}}bool toV8{{cpp_class}}(const {{cpp_class}}&, v8::Local<v8::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate*);
21 template<class CallbackInfo>
22 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}& impl)
24 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
27 template <>
28 struct NativeValueTraits<{{cpp_class}}> {
29 static {{cpp_class}} nativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&);
32 } // namespace blink
34 #endif // {{v8_original_class}}_h