| 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 V8TestMediaQueryListListener_h | 33 #ifndef V8TestCheckSecurityInterface_h |
| 34 #define V8TestMediaQueryListListener_h | 34 #define V8TestCheckSecurityInterface_h |
| 35 | 35 |
| 36 #include "bindings/tests/idls/TestMediaQueryListListener.h" | 36 #include "bindings/tests/idls/TestCheckSecurityInterface.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 V8TestMediaQueryListListener { | 43 class V8TestCheckSecurityInterface { |
| 44 public: | 44 public: |
| 45 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp
e); | 45 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp
e); |
| 46 static bool hasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); | 46 static bool hasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); |
| 47 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor
ldType); | 47 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor
ldType); |
| 48 static TestMediaQueryListListener* toNative(v8::Handle<v8::Object> object) | 48 static TestCheckSecurityInterface* toNative(v8::Handle<v8::Object> object) |
| 49 { | 49 { |
| 50 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); | 50 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); |
| 51 } | 51 } |
| 52 static void derefObject(void*); | 52 static void derefObject(void*); |
| 53 static const WrapperTypeInfo wrapperTypeInfo; | 53 static const WrapperTypeInfo wrapperTypeInfo; |
| 54 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; | 54 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; |
| 55 static inline void* toInternalPointer(TestMediaQueryListListener* impl) | 55 static inline void* toInternalPointer(TestCheckSecurityInterface* impl) |
| 56 { | 56 { |
| 57 return impl; | 57 return impl; |
| 58 } | 58 } |
| 59 | 59 |
| 60 static inline TestMediaQueryListListener* fromInternalPointer(void* object) | 60 static inline TestCheckSecurityInterface* fromInternalPointer(void* object) |
| 61 { | 61 { |
| 62 return static_cast<TestMediaQueryListListener*>(object); | 62 return static_cast<TestCheckSecurityInterface*>(object); |
| 63 } | 63 } |
| 64 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestM
ediaQueryListListener*, v8::Isolate*) { } | 64 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestC
heckSecurityInterface*, v8::Isolate*) { } |
| 65 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } | 65 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 friend v8::Handle<v8::Object> wrap(TestMediaQueryListListener*, v8::Handle<v
8::Object> creationContext, v8::Isolate*); | 68 friend v8::Handle<v8::Object> wrap(TestCheckSecurityInterface*, v8::Handle<v
8::Object> creationContext, v8::Isolate*); |
| 69 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestMediaQueryListLis
tener>, v8::Handle<v8::Object> creationContext, v8::Isolate*); | 69 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestCheckSecurityInte
rface>, v8::Handle<v8::Object> creationContext, v8::Isolate*); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 template<> | 72 template<> |
| 73 class WrapperTypeTraits<TestMediaQueryListListener > { | 73 class WrapperTypeTraits<TestCheckSecurityInterface > { |
| 74 public: | 74 public: |
| 75 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestMediaQueryLi
stListener::wrapperTypeInfo; } | 75 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestCheckSecurit
yInterface::wrapperTypeInfo; } |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 inline v8::Handle<v8::Object> wrap(TestMediaQueryListListener* impl, v8::Handle<
v8::Object> creationContext, v8::Isolate* isolate) | 78 inline v8::Handle<v8::Object> wrap(TestCheckSecurityInterface* impl, v8::Handle<
v8::Object> creationContext, v8::Isolate* isolate) |
| 79 { | 79 { |
| 80 ASSERT(impl); | 80 ASSERT(impl); |
| 81 ASSERT(!DOMDataStore::containsWrapper<V8TestMediaQueryListListener>(impl, is
olate)); | 81 ASSERT(!DOMDataStore::containsWrapper<V8TestCheckSecurityInterface>(impl, is
olate)); |
| 82 return V8TestMediaQueryListListener::createWrapper(impl, creationContext, is
olate); | 82 return V8TestCheckSecurityInterface::createWrapper(impl, creationContext, is
olate); |
| 83 } | 83 } |
| 84 | 84 |
| 85 inline v8::Handle<v8::Value> toV8(TestMediaQueryListListener* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) | 85 inline v8::Handle<v8::Value> toV8(TestCheckSecurityInterface* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) |
| 86 { | 86 { |
| 87 if (UNLIKELY(!impl)) | 87 if (UNLIKELY(!impl)) |
| 88 return v8NullWithCheck(isolate); | 88 return v8NullWithCheck(isolate); |
| 89 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestMediaQueryLis
tListener>(impl, isolate); | 89 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestCheckSecurity
Interface>(impl, isolate); |
| 90 if (!wrapper.IsEmpty()) | 90 if (!wrapper.IsEmpty()) |
| 91 return wrapper; | 91 return wrapper; |
| 92 return wrap(impl, creationContext, isolate); | 92 return wrap(impl, creationContext, isolate); |
| 93 } | 93 } |
| 94 | 94 |
| 95 template<typename CallbackInfo> | 95 template<typename CallbackInfo> |
| 96 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestMediaQueryLis
tListener* impl) | 96 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestCheckSecurity
Interface* impl) |
| 97 { | 97 { |
| 98 if (UNLIKELY(!impl)) { | 98 if (UNLIKELY(!impl)) { |
| 99 v8SetReturnValueNull(callbackInfo); | 99 v8SetReturnValueNull(callbackInfo); |
| 100 return; | 100 return; |
| 101 } | 101 } |
| 102 if (DOMDataStore::setReturnValueFromWrapper<V8TestMediaQueryListListener>(ca
llbackInfo.GetReturnValue(), impl)) | 102 if (DOMDataStore::setReturnValueFromWrapper<V8TestCheckSecurityInterface>(ca
llbackInfo.GetReturnValue(), impl)) |
| 103 return; | 103 return; |
| 104 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); | 104 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); |
| 105 v8SetReturnValue(callbackInfo, wrapper); | 105 v8SetReturnValue(callbackInfo, wrapper); |
| 106 } | 106 } |
| 107 | 107 |
| 108 template<typename CallbackInfo> | 108 template<typename CallbackInfo> |
| 109 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestM
ediaQueryListListener* impl) | 109 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestC
heckSecurityInterface* impl) |
| 110 { | 110 { |
| 111 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld); | 111 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld); |
| 112 if (UNLIKELY(!impl)) { | 112 if (UNLIKELY(!impl)) { |
| 113 v8SetReturnValueNull(callbackInfo); | 113 v8SetReturnValueNull(callbackInfo); |
| 114 return; | 114 return; |
| 115 } | 115 } |
| 116 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestMediaQueryList
Listener>(callbackInfo.GetReturnValue(), impl)) | 116 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestCheckSecurityI
nterface>(callbackInfo.GetReturnValue(), impl)) |
| 117 return; | 117 return; |
| 118 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn
fo.GetIsolate()); | 118 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn
fo.GetIsolate()); |
| 119 v8SetReturnValue(callbackInfo, wrapper); | 119 v8SetReturnValue(callbackInfo, wrapper); |
| 120 } | 120 } |
| 121 | 121 |
| 122 template<class CallbackInfo, class Wrappable> | 122 template<class CallbackInfo, class Wrappable> |
| 123 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestMediaQuer
yListListener* impl, Wrappable* wrappable) | 123 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestCheckSecu
rityInterface* impl, Wrappable* wrappable) |
| 124 { | 124 { |
| 125 if (UNLIKELY(!impl)) { | 125 if (UNLIKELY(!impl)) { |
| 126 v8SetReturnValueNull(callbackInfo); | 126 v8SetReturnValueNull(callbackInfo); |
| 127 return; | 127 return; |
| 128 } | 128 } |
| 129 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestMediaQueryListListener
>(callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) | 129 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestCheckSecurityInterface
>(callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) |
| 130 return; | 130 return; |
| 131 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); | 131 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); |
| 132 v8SetReturnValue(callbackInfo, wrapper); | 132 v8SetReturnValue(callbackInfo, wrapper); |
| 133 } | 133 } |
| 134 | 134 |
| 135 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestMediaQueryListListener > impl,
v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 135 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestCheckSecurityInterface > impl,
v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 136 { | 136 { |
| 137 return toV8(impl.get(), creationContext, isolate); | 137 return toV8(impl.get(), creationContext, isolate); |
| 138 } | 138 } |
| 139 | 139 |
| 140 template<class CallbackInfo> | 140 template<class CallbackInfo> |
| 141 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestMe
diaQueryListListener > impl) | 141 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestCh
eckSecurityInterface > impl) |
| 142 { | 142 { |
| 143 v8SetReturnValue(callbackInfo, impl.get()); | 143 v8SetReturnValue(callbackInfo, impl.get()); |
| 144 } | 144 } |
| 145 | 145 |
| 146 template<class CallbackInfo> | 146 template<class CallbackInfo> |
| 147 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<TestMediaQueryListListener > impl) | 147 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<TestCheckSecurityInterface > impl) |
| 148 { | 148 { |
| 149 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); | 149 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); |
| 150 } | 150 } |
| 151 | 151 |
| 152 template<class CallbackInfo, class Wrappable> | 152 template<class CallbackInfo, class Wrappable> |
| 153 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stMediaQueryListListener > impl, Wrappable* wrappable) | 153 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stCheckSecurityInterface > impl, Wrappable* wrappable) |
| 154 { | 154 { |
| 155 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 155 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
| 156 } | 156 } |
| 157 | 157 |
| 158 } | 158 } |
| 159 | 159 |
| 160 #endif // V8TestMediaQueryListListener_h | 160 #endif // V8TestCheckSecurityInterface_h |
| OLD | NEW |