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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceAudioBuffer.h

Issue 131183002: IDL compiler: AudioBuffer interfaces (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
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
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 V8TestInterfaceConstructor_h 33 #ifndef V8TestInterfaceAudioBuffer_h
34 #define V8TestInterfaceConstructor_h 34 #define V8TestInterfaceAudioBuffer_h
35 35
36 #include "bindings/tests/idls/TestInterfaceConstructor.h" 36 #include "V8AudioBuffer.h"
37 #include "bindings/tests/idls/TestInterfaceAudioBuffer.h"
37 #include "bindings/v8/V8Binding.h" 38 #include "bindings/v8/V8Binding.h"
38 #include "bindings/v8/V8DOMWrapper.h" 39 #include "bindings/v8/V8DOMWrapper.h"
39 #include "bindings/v8/WrapperTypeInfo.h" 40 #include "bindings/v8/WrapperTypeInfo.h"
40 41
41 namespace WebCore { 42 namespace WebCore {
42 43
43 class V8TestInterfaceConstructor { 44 class V8TestInterfaceAudioBuffer {
44 public: 45 public:
45 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp e); 46 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp e);
46 static bool hasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); 47 static bool hasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*);
47 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*, WrapperWor ldType); 48 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*, WrapperWor ldType);
48 static TestInterfaceConstructor* toNative(v8::Handle<v8::Object> object) 49 static TestInterfaceAudioBuffer* toNative(v8::Handle<v8::Object> object)
49 { 50 {
50 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex)); 51 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex));
51 } 52 }
52 static void derefObject(void*); 53 static void derefObject(void*);
53 static const WrapperTypeInfo wrapperTypeInfo; 54 static const WrapperTypeInfo wrapperTypeInfo;
54 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
55 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ; 55 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
56 static inline void* toInternalPointer(TestInterfaceConstructor* impl) 56 static inline void* toInternalPointer(TestInterfaceAudioBuffer* impl)
57 { 57 {
58 return impl; 58 return V8AudioBuffer::toInternalPointer(impl);
59 } 59 }
60 60
61 static inline TestInterfaceConstructor* fromInternalPointer(void* object) 61 static inline TestInterfaceAudioBuffer* fromInternalPointer(void* object)
62 { 62 {
63 return static_cast<TestInterfaceConstructor*>(object); 63 return static_cast<TestInterfaceAudioBuffer*>(V8AudioBuffer::fromInterna lPointer(object));
64 } 64 }
65 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterfaceConstructor*, v8::Isolate*) { } 65 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterfaceAudioBuffer*, v8::Isolate*) { }
66 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { } 66 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { }
67 67
68 private: 68 private:
69 friend v8::Handle<v8::Object> wrap(TestInterfaceConstructor*, v8::Handle<v8: :Object> creationContext, v8::Isolate*); 69 friend v8::Handle<v8::Object> wrap(TestInterfaceAudioBuffer*, v8::Handle<v8: :Object> creationContext, v8::Isolate*);
70 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfaceConstruc tor>, v8::Handle<v8::Object> creationContext, v8::Isolate*); 70 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfaceAudioBuf fer>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
71 }; 71 };
72 72
73 template<> 73 template<>
74 class WrapperTypeTraits<TestInterfaceConstructor > { 74 class WrapperTypeTraits<TestInterfaceAudioBuffer > {
75 public: 75 public:
76 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestInterfaceCon structor::wrapperTypeInfo; } 76 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestInterfaceAud ioBuffer::wrapperTypeInfo; }
77 }; 77 };
78 78
79 inline v8::Handle<v8::Object> wrap(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate) 79 inline v8::Handle<v8::Object> wrap(TestInterfaceAudioBuffer* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate)
80 { 80 {
81 ASSERT(impl); 81 ASSERT(impl);
82 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor>(impl, isol ate)); 82 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceAudioBuffer>(impl, isol ate));
83 return V8TestInterfaceConstructor::createWrapper(impl, creationContext, isol ate); 83 return V8TestInterfaceAudioBuffer::createWrapper(impl, creationContext, isol ate);
84 } 84 }
85 85
86 inline v8::Handle<v8::Value> toV8(TestInterfaceConstructor* impl, v8::Handle<v8: :Object> creationContext, v8::Isolate* isolate) 86 inline v8::Handle<v8::Value> toV8(TestInterfaceAudioBuffer* impl, v8::Handle<v8: :Object> creationContext, v8::Isolate* isolate)
87 { 87 {
88 if (UNLIKELY(!impl)) 88 if (UNLIKELY(!impl))
89 return v8::Null(isolate); 89 return v8::Null(isolate);
90 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterfaceCons tructor>(impl, isolate); 90 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterfaceAudi oBuffer>(impl, isolate);
91 if (!wrapper.IsEmpty()) 91 if (!wrapper.IsEmpty())
92 return wrapper; 92 return wrapper;
93 return wrap(impl, creationContext, isolate); 93 return wrap(impl, creationContext, isolate);
94 } 94 }
95 95
96 template<typename CallbackInfo> 96 template<typename CallbackInfo>
97 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceCons tructor* impl) 97 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceAudi oBuffer* impl)
98 { 98 {
99 if (UNLIKELY(!impl)) { 99 if (UNLIKELY(!impl)) {
100 v8SetReturnValueNull(callbackInfo); 100 v8SetReturnValueNull(callbackInfo);
101 return; 101 return;
102 } 102 }
103 if (DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceConstructor>(call backInfo.GetReturnValue(), impl)) 103 if (DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceAudioBuffer>(call backInfo.GetReturnValue(), impl))
104 return; 104 return;
105 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());
106 v8SetReturnValue(callbackInfo, wrapper); 106 v8SetReturnValue(callbackInfo, wrapper);
107 } 107 }
108 108
109 template<typename CallbackInfo> 109 template<typename CallbackInfo>
110 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI nterfaceConstructor* impl) 110 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI nterfaceAudioBuffer* impl)
111 { 111 {
112 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld); 112 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld);
113 if (UNLIKELY(!impl)) { 113 if (UNLIKELY(!impl)) {
114 v8SetReturnValueNull(callbackInfo); 114 v8SetReturnValueNull(callbackInfo);
115 return; 115 return;
116 } 116 }
117 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfaceConst ructor>(callbackInfo.GetReturnValue(), impl)) 117 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfaceAudio Buffer>(callbackInfo.GetReturnValue(), impl))
118 return; 118 return;
119 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());
120 v8SetReturnValue(callbackInfo, wrapper); 120 v8SetReturnValue(callbackInfo, wrapper);
121 } 121 }
122 122
123 template<class CallbackInfo, class Wrappable> 123 template<class CallbackInfo, class Wrappable>
124 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface Constructor* impl, Wrappable* wrappable) 124 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface AudioBuffer* impl, Wrappable* wrappable)
125 { 125 {
126 if (UNLIKELY(!impl)) { 126 if (UNLIKELY(!impl)) {
127 v8SetReturnValueNull(callbackInfo); 127 v8SetReturnValueNull(callbackInfo);
128 return; 128 return;
129 } 129 }
130 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfaceConstructor>( callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) 130 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfaceAudioBuffer>( callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable))
131 return; 131 return;
132 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());
133 v8SetReturnValue(callbackInfo, wrapper); 133 v8SetReturnValue(callbackInfo, wrapper);
134 } 134 }
135 135
136 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfaceConstructor > impl, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate) 136 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfaceAudioBuffer > impl, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate)
137 { 137 {
138 return toV8(impl.get(), creationContext, isolate); 138 return toV8(impl.get(), creationContext, isolate);
139 } 139 }
140 140
141 template<class CallbackInfo> 141 template<class CallbackInfo>
142 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn terfaceConstructor > impl) 142 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn terfaceAudioBuffer > impl)
143 { 143 {
144 v8SetReturnValue(callbackInfo, impl.get()); 144 v8SetReturnValue(callbackInfo, impl.get());
145 } 145 }
146 146
147 template<class CallbackInfo> 147 template<class CallbackInfo>
148 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestInterfaceConstructor > impl) 148 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestInterfaceAudioBuffer > impl)
149 { 149 {
150 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); 150 v8SetReturnValueForMainWorld(callbackInfo, impl.get());
151 } 151 }
152 152
153 template<class CallbackInfo, class Wrappable> 153 template<class CallbackInfo, class Wrappable>
154 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stInterfaceConstructor > impl, Wrappable* wrappable) 154 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stInterfaceAudioBuffer > impl, Wrappable* wrappable)
155 { 155 {
156 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 156 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
157 } 157 }
158 158
159 } 159 }
160 #endif // V8TestInterfaceConstructor_h 160 #endif // V8TestInterfaceAudioBuffer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698