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

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

Issue 2183623004: Add IDLDictionaryBase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix multi-level inheritance bug Created 4 years, 4 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 {% include 'copyright_block.txt' %} 1 {% include 'copyright_block.txt' %}
2 #ifndef {{v8_original_class}}_h 2 #ifndef {{v8_original_class}}_h
3 #define {{v8_original_class}}_h 3 #define {{v8_original_class}}_h
4 4
5 {% for filename in header_includes %} 5 {% for filename in header_includes %}
6 #include "{{filename}}" 6 #include "{{filename}}"
7 {% endfor %} 7 {% endfor %}
8 8
9 namespace blink { 9 namespace blink {
10 10
11 class ExceptionState; 11 class ExceptionState;
12 12
13 class {{v8_class}} { 13 class {{v8_class}} {
14 public: 14 public:
15 {{exported}}static void toImpl(v8::Isolate*, v8::Local<v8::Value>, {{cpp_cla ss}}&, ExceptionState&); 15 {{exported}}static void toImpl(v8::Isolate*, v8::Local<v8::Value>, {{cpp_cla ss}}&, ExceptionState&);
16 }; 16 };
17 17
18 v8::Local<v8::Value> toV8(const {{cpp_class}}&, v8::Local<v8::Object>, v8::Isola te*);
19 {{exported}}bool toV8{{cpp_class}}(const {{cpp_class}}&, v8::Local<v8::Object> d ictionary, v8::Local<v8::Object> creationContext, v8::Isolate*); 18 {{exported}}bool toV8{{cpp_class}}(const {{cpp_class}}&, v8::Local<v8::Object> d ictionary, v8::Local<v8::Object> creationContext, v8::Isolate*);
20 19
21 template<class CallbackInfo> 20 template<class CallbackInfo>
22 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}& im pl) 21 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}& im pl)
23 { 22 {
24 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf o.GetIsolate())); 23 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf o.GetIsolate()));
25 } 24 }
26 25
27 template <> 26 template <>
28 struct NativeValueTraits<{{cpp_class}}> { 27 struct NativeValueTraits<{{cpp_class}}> {
29 static {{cpp_class}} nativeValue(v8::Isolate*, v8::Local<v8::Value>, Excepti onState&); 28 static {{cpp_class}} nativeValue(v8::Isolate*, v8::Local<v8::Value>, Excepti onState&);
30 }; 29 };
31 30
32 template <> 31 template <>
33 struct V8TypeOf<{{cpp_class}}> { 32 struct V8TypeOf<{{cpp_class}}> {
34 typedef {{v8_class}} Type; 33 typedef {{v8_class}} Type;
35 }; 34 };
36 35
37 } // namespace blink 36 } // namespace blink
38 37
39 #endif // {{v8_original_class}}_h 38 #endif // {{v8_original_class}}_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698