OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 12 matching lines...) Expand all Loading... |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! | 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! |
32 | 32 |
33 #ifndef V8TestEventConstructor_h | 33 #ifndef V8TestInterfacePython2_h |
34 #define V8TestEventConstructor_h | 34 #define V8TestInterfacePython2_h |
35 | 35 |
36 #include "bindings/tests/idls/TestEventConstructor.h" | 36 #include "bindings/tests/idls/TestInterfacePython2.h" |
37 #include "bindings/v8/V8Binding.h" | 37 #include "bindings/v8/V8Binding.h" |
38 #include "bindings/v8/V8DOMWrapper.h" | 38 #include "bindings/v8/V8DOMWrapper.h" |
39 #include "bindings/v8/WrapperTypeInfo.h" | 39 #include "bindings/v8/WrapperTypeInfo.h" |
40 | 40 |
41 namespace WebCore { | 41 namespace WebCore { |
42 | 42 |
43 class Dictionary; | 43 class V8TestInterfacePython2 { |
44 class V8TestEventConstructor { | |
45 public: | 44 public: |
46 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp
e); | 45 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp
e); |
47 static bool hasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); | 46 static bool hasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); |
48 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor
ldType); | 47 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor
ldType); |
49 static TestEventConstructor* toNative(v8::Handle<v8::Object> object) | 48 static TestInterfacePython2* toNative(v8::Handle<v8::Object> object) |
50 { | 49 { |
51 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); | 50 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); |
52 } | 51 } |
53 static void derefObject(void*); | 52 static void derefObject(void*); |
54 static const WrapperTypeInfo wrapperTypeInfo; | 53 static const WrapperTypeInfo wrapperTypeInfo; |
55 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 54 static void visitDOMWrapper(void*, const v8::Persistent<v8::Object>&, v8::Is
olate*); |
56 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; | 55 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; |
57 static inline void* toInternalPointer(TestEventConstructor* impl) | 56 static inline void* toInternalPointer(TestInterfacePython2* impl) |
58 { | 57 { |
59 return impl; | 58 return impl; |
60 } | 59 } |
61 | 60 |
62 static inline TestEventConstructor* fromInternalPointer(void* object) | 61 static inline TestInterfacePython2* fromInternalPointer(void* object) |
63 { | 62 { |
64 return static_cast<TestEventConstructor*>(object); | 63 return static_cast<TestInterfacePython2*>(object); |
65 } | 64 } |
66 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestE
ventConstructor*, v8::Isolate*) { } | 65 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfacePython2*, v8::Isolate*) { } |
67 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } | 66 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } |
68 | 67 |
69 private: | 68 private: |
70 friend v8::Handle<v8::Object> wrap(TestEventConstructor*, v8::Handle<v8::Obj
ect> creationContext, v8::Isolate*); | 69 friend v8::Handle<v8::Object> wrap(TestInterfacePython2*, v8::Handle<v8::Obj
ect> creationContext, v8::Isolate*); |
71 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestEventConstructor>
, v8::Handle<v8::Object> creationContext, v8::Isolate*); | 70 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfacePython2>
, v8::Handle<v8::Object> creationContext, v8::Isolate*); |
72 }; | 71 }; |
73 | 72 |
74 template<> | 73 template<> |
75 class WrapperTypeTraits<TestEventConstructor > { | 74 class WrapperTypeTraits<TestInterfacePython2 > { |
76 public: | 75 public: |
77 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestEventConstru
ctor::wrapperTypeInfo; } | 76 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestInterfacePyt
hon2::wrapperTypeInfo; } |
78 }; | 77 }; |
79 | 78 |
80 inline v8::Handle<v8::Object> wrap(TestEventConstructor* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) | 79 inline v8::Handle<v8::Object> wrap(TestInterfacePython2* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) |
81 { | 80 { |
82 ASSERT(impl); | 81 ASSERT(impl); |
83 ASSERT(!DOMDataStore::containsWrapper<V8TestEventConstructor>(impl, isolate)
); | 82 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfacePython2>(impl, isolate)
); |
84 return V8TestEventConstructor::createWrapper(impl, creationContext, isolate)
; | 83 return V8TestInterfacePython2::createWrapper(impl, creationContext, isolate)
; |
85 } | 84 } |
86 | 85 |
87 inline v8::Handle<v8::Value> toV8(TestEventConstructor* impl, v8::Handle<v8::Obj
ect> creationContext, v8::Isolate* isolate) | 86 inline v8::Handle<v8::Value> toV8(TestInterfacePython2* impl, v8::Handle<v8::Obj
ect> creationContext, v8::Isolate* isolate) |
88 { | 87 { |
89 if (UNLIKELY(!impl)) | 88 if (UNLIKELY(!impl)) |
90 return v8::Null(isolate); | 89 return v8::Null(isolate); |
91 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestEventConstruc
tor>(impl, isolate); | 90 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterfacePyth
on2>(impl, isolate); |
92 if (!wrapper.IsEmpty()) | 91 if (!wrapper.IsEmpty()) |
93 return wrapper; | 92 return wrapper; |
94 return wrap(impl, creationContext, isolate); | 93 return wrap(impl, creationContext, isolate); |
95 } | 94 } |
96 | 95 |
97 template<typename CallbackInfo> | 96 template<typename CallbackInfo> |
98 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestEventConstruc
tor* impl) | 97 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfacePyth
on2* impl) |
99 { | 98 { |
100 if (UNLIKELY(!impl)) { | 99 if (UNLIKELY(!impl)) { |
101 v8SetReturnValueNull(callbackInfo); | 100 v8SetReturnValueNull(callbackInfo); |
102 return; | 101 return; |
103 } | 102 } |
104 if (DOMDataStore::setReturnValueFromWrapper<V8TestEventConstructor>(callback
Info.GetReturnValue(), impl)) | 103 if (DOMDataStore::setReturnValueFromWrapper<V8TestInterfacePython2>(callback
Info.GetReturnValue(), impl)) |
105 return; | 104 return; |
106 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); | 105 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); |
107 v8SetReturnValue(callbackInfo, wrapper); | 106 v8SetReturnValue(callbackInfo, wrapper); |
108 } | 107 } |
109 | 108 |
110 template<typename CallbackInfo> | 109 template<typename CallbackInfo> |
111 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestE
ventConstructor* impl) | 110 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI
nterfacePython2* impl) |
112 { | 111 { |
113 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld); | 112 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld); |
114 if (UNLIKELY(!impl)) { | 113 if (UNLIKELY(!impl)) { |
115 v8SetReturnValueNull(callbackInfo); | 114 v8SetReturnValueNull(callbackInfo); |
116 return; | 115 return; |
117 } | 116 } |
118 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestEventConstruct
or>(callbackInfo.GetReturnValue(), impl)) | 117 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfacePytho
n2>(callbackInfo.GetReturnValue(), impl)) |
119 return; | 118 return; |
120 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn
fo.GetIsolate()); | 119 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn
fo.GetIsolate()); |
121 v8SetReturnValue(callbackInfo, wrapper); | 120 v8SetReturnValue(callbackInfo, wrapper); |
122 } | 121 } |
123 | 122 |
124 template<class CallbackInfo, class Wrappable> | 123 template<class CallbackInfo, class Wrappable> |
125 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestEventCons
tructor* impl, Wrappable* wrappable) | 124 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface
Python2* impl, Wrappable* wrappable) |
126 { | 125 { |
127 if (UNLIKELY(!impl)) { | 126 if (UNLIKELY(!impl)) { |
128 v8SetReturnValueNull(callbackInfo); | 127 v8SetReturnValueNull(callbackInfo); |
129 return; | 128 return; |
130 } | 129 } |
131 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestEventConstructor>(call
backInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) | 130 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfacePython2>(call
backInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) |
132 return; | 131 return; |
133 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); | 132 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); |
134 v8SetReturnValue(callbackInfo, wrapper); | 133 v8SetReturnValue(callbackInfo, wrapper); |
135 } | 134 } |
136 | 135 |
137 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestEventConstructor > impl, v8::Ha
ndle<v8::Object> creationContext, v8::Isolate* isolate) | 136 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfacePython2 > impl, v8::Ha
ndle<v8::Object> creationContext, v8::Isolate* isolate) |
138 { | 137 { |
139 return toV8(impl.get(), creationContext, isolate); | 138 return toV8(impl.get(), creationContext, isolate); |
140 } | 139 } |
141 | 140 |
142 template<class CallbackInfo> | 141 template<class CallbackInfo> |
143 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestEv
entConstructor > impl) | 142 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn
terfacePython2 > impl) |
144 { | 143 { |
145 v8SetReturnValue(callbackInfo, impl.get()); | 144 v8SetReturnValue(callbackInfo, impl.get()); |
146 } | 145 } |
147 | 146 |
148 template<class CallbackInfo> | 147 template<class CallbackInfo> |
149 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<TestEventConstructor > impl) | 148 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<TestInterfacePython2 > impl) |
150 { | 149 { |
151 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); | 150 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); |
152 } | 151 } |
153 | 152 |
154 template<class CallbackInfo, class Wrappable> | 153 template<class CallbackInfo, class Wrappable> |
155 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stEventConstructor > impl, Wrappable* wrappable) | 154 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stInterfacePython2 > impl, Wrappable* wrappable) |
156 { | 155 { |
157 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 156 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
158 } | 157 } |
159 | 158 |
160 bool fillTestEventConstructorInit(TestEventConstructorInit&, const Dictionary&,
ExceptionState&, const String& = ""); | |
161 | |
162 } | 159 } |
163 #endif // V8TestEventConstructor_h | 160 #endif // V8TestInterfacePython2_h |
OLD | NEW |