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

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

Issue 24053003: Support partial interface for test support idls (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch Created 7 years, 2 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 /* 1 /*
2 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19 */ 19 */
20 20
21 #ifndef V8TestEventConstructor_h 21 #ifndef V8NonCoreTestInterface_h
22 #define V8TestEventConstructor_h 22 #define V8NonCoreTestInterface_h
23 23
24 #include "bindings/tests/idls/TestEventConstructor.h" 24 #include "bindings/tests/idls/testing/NonCoreTestInterface.h"
25 #include "bindings/v8/V8Binding.h" 25 #include "bindings/v8/V8Binding.h"
26 #include "bindings/v8/V8DOMWrapper.h" 26 #include "bindings/v8/V8DOMWrapper.h"
27 #include "bindings/v8/WrapperTypeInfo.h" 27 #include "bindings/v8/WrapperTypeInfo.h"
28 28
29 namespace WebCore { 29 namespace WebCore {
30 30
31 class Dictionary; 31 class V8NonCoreTestInterface {
32 class V8TestEventConstructor {
33 public: 32 public:
34 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp e); 33 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp e);
35 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); 34 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*);
36 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor ldType); 35 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor ldType);
37 static TestEventConstructor* toNative(v8::Handle<v8::Object> object) 36 static NonCoreTestInterface* toNative(v8::Handle<v8::Object> object)
38 { 37 {
39 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex)); 38 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex));
40 } 39 }
41 static void derefObject(void*); 40 static void derefObject(void*);
42 static WrapperTypeInfo info; 41 static WrapperTypeInfo info;
43 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&); 42 #if ENABLE(Condition11) || ENABLE(Condition12)
43 static void supplementalMethod3MethodCustom(const v8::FunctionCallbackInfo<v 8::Value>&);
44 #endif // ENABLE(Condition11) || ENABLE(Condition12)
44 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ; 45 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
45 static inline void* toInternalPointer(TestEventConstructor* impl) 46 static inline void* toInternalPointer(NonCoreTestInterface* impl)
46 { 47 {
47 return impl; 48 return impl;
48 } 49 }
49 50
50 static inline TestEventConstructor* fromInternalPointer(void* object) 51 static inline NonCoreTestInterface* fromInternalPointer(void* object)
51 { 52 {
52 return static_cast<TestEventConstructor*>(object); 53 return static_cast<NonCoreTestInterface*>(object);
53 } 54 }
54 static void installPerContextProperties(v8::Handle<v8::Object>, TestEventCon structor*, v8::Isolate*) { } 55 static void installPerContextProperties(v8::Handle<v8::Object>, NonCoreTestI nterface*, v8::Isolate*);
55 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8: :Isolate*) { } 56 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8: :Isolate*) { }
56 57
57 private: 58 private:
58 friend v8::Handle<v8::Object> wrap(TestEventConstructor*, v8::Handle<v8::Obj ect> creationContext, v8::Isolate*); 59 friend v8::Handle<v8::Object> wrap(NonCoreTestInterface*, v8::Handle<v8::Obj ect> creationContext, v8::Isolate*);
59 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestEventConstructor> , v8::Handle<v8::Object> creationContext, v8::Isolate*); 60 static v8::Handle<v8::Object> createWrapper(PassRefPtr<NonCoreTestInterface> , v8::Handle<v8::Object> creationContext, v8::Isolate*);
60 }; 61 };
61 62
62 template<> 63 template<>
63 class WrapperTypeTraits<TestEventConstructor > { 64 class WrapperTypeTraits<NonCoreTestInterface > {
64 public: 65 public:
65 static WrapperTypeInfo* info() { return &V8TestEventConstructor::info; } 66 static WrapperTypeInfo* info() { return &V8NonCoreTestInterface::info; }
66 }; 67 };
67 68
68 inline v8::Handle<v8::Object> wrap(TestEventConstructor* impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate) 69 inline v8::Handle<v8::Object> wrap(NonCoreTestInterface* impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate)
69 { 70 {
70 ASSERT(impl); 71 ASSERT(impl);
71 ASSERT(!DOMDataStore::containsWrapper<V8TestEventConstructor>(impl, isolate) ); 72 ASSERT(!DOMDataStore::containsWrapper<V8NonCoreTestInterface>(impl, isolate) );
72 return V8TestEventConstructor::createWrapper(impl, creationContext, isolate) ; 73 return V8NonCoreTestInterface::createWrapper(impl, creationContext, isolate) ;
73 } 74 }
74 75
75 inline v8::Handle<v8::Value> toV8(TestEventConstructor* impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate) 76 inline v8::Handle<v8::Value> toV8(NonCoreTestInterface* impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate)
76 { 77 {
77 if (UNLIKELY(!impl)) 78 if (UNLIKELY(!impl))
78 return v8NullWithCheck(isolate); 79 return v8NullWithCheck(isolate);
79 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestEventConstruc tor>(impl, isolate); 80 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8NonCoreTestInterf ace>(impl, isolate);
80 if (!wrapper.IsEmpty()) 81 if (!wrapper.IsEmpty())
81 return wrapper; 82 return wrapper;
82 return wrap(impl, creationContext, isolate); 83 return wrap(impl, creationContext, isolate);
83 } 84 }
84 85
85 template<typename CallbackInfo> 86 template<typename CallbackInfo>
86 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestEventConstruc tor* impl, v8::Handle<v8::Object> creationContext) 87 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, NonCoreTestInterf ace* impl, v8::Handle<v8::Object> creationContext)
87 { 88 {
88 if (UNLIKELY(!impl)) { 89 if (UNLIKELY(!impl)) {
89 v8SetReturnValueNull(callbackInfo); 90 v8SetReturnValueNull(callbackInfo);
90 return; 91 return;
91 } 92 }
92 if (DOMDataStore::setReturnValueFromWrapper<V8TestEventConstructor>(callback Info.GetReturnValue(), impl)) 93 if (DOMDataStore::setReturnValueFromWrapper<V8NonCoreTestInterface>(callback Info.GetReturnValue(), impl))
93 return; 94 return;
94 v8::Handle<v8::Object> wrapper = wrap(impl, creationContext, callbackInfo.Ge tIsolate()); 95 v8::Handle<v8::Object> wrapper = wrap(impl, creationContext, callbackInfo.Ge tIsolate());
95 v8SetReturnValue(callbackInfo, wrapper); 96 v8SetReturnValue(callbackInfo, wrapper);
96 } 97 }
97 98
98 template<typename CallbackInfo> 99 template<typename CallbackInfo>
99 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestE ventConstructor* impl, v8::Handle<v8::Object> creationContext) 100 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, NonCo reTestInterface* impl, v8::Handle<v8::Object> creationContext)
100 { 101 {
101 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld); 102 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld);
102 if (UNLIKELY(!impl)) { 103 if (UNLIKELY(!impl)) {
103 v8SetReturnValueNull(callbackInfo); 104 v8SetReturnValueNull(callbackInfo);
104 return; 105 return;
105 } 106 }
106 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestEventConstruct or>(callbackInfo.GetReturnValue(), impl)) 107 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8NonCoreTestInterfa ce>(callbackInfo.GetReturnValue(), impl))
107 return; 108 return;
108 v8::Handle<v8::Value> wrapper = wrap(impl, creationContext, callbackInfo.Get Isolate()); 109 v8::Handle<v8::Value> wrapper = wrap(impl, creationContext, callbackInfo.Get Isolate());
109 v8SetReturnValue(callbackInfo, wrapper); 110 v8SetReturnValue(callbackInfo, wrapper);
110 } 111 }
111 112
112 template<class CallbackInfo, class Wrappable> 113 template<class CallbackInfo, class Wrappable>
113 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestEventCons tructor* impl, Wrappable* wrappable) 114 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, NonCoreTestIn terface* impl, Wrappable* wrappable)
114 { 115 {
115 if (UNLIKELY(!impl)) { 116 if (UNLIKELY(!impl)) {
116 v8SetReturnValueNull(callbackInfo); 117 v8SetReturnValueNull(callbackInfo);
117 return; 118 return;
118 } 119 }
119 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestEventConstructor>(call backInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) 120 if (DOMDataStore::setReturnValueFromWrapperFast<V8NonCoreTestInterface>(call backInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable))
120 return; 121 return;
121 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate()); 122 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
122 v8SetReturnValue(callbackInfo, wrapper); 123 v8SetReturnValue(callbackInfo, wrapper);
123 } 124 }
124 125
125 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestEventConstructor > impl, v8::Ha ndle<v8::Object> creationContext, v8::Isolate* isolate) 126 inline v8::Handle<v8::Value> toV8(PassRefPtr<NonCoreTestInterface > impl, v8::Ha ndle<v8::Object> creationContext, v8::Isolate* isolate)
126 { 127 {
127 return toV8(impl.get(), creationContext, isolate); 128 return toV8(impl.get(), creationContext, isolate);
128 } 129 }
129 130
130 template<class CallbackInfo> 131 template<class CallbackInfo>
131 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestEv entConstructor > impl, v8::Handle<v8::Object> creationContext) 132 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<NonCor eTestInterface > impl, v8::Handle<v8::Object> creationContext)
132 { 133 {
133 v8SetReturnValue(callbackInfo, impl.get(), creationContext); 134 v8SetReturnValue(callbackInfo, impl.get(), creationContext);
134 } 135 }
135 136
136 template<class CallbackInfo> 137 template<class CallbackInfo>
137 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestEventConstructor > impl, v8::Handle<v8::Object> creationContext) 138 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<NonCoreTestInterface > impl, v8::Handle<v8::Object> creationContext)
138 { 139 {
139 v8SetReturnValueForMainWorld(callbackInfo, impl.get(), creationContext); 140 v8SetReturnValueForMainWorld(callbackInfo, impl.get(), creationContext);
140 } 141 }
141 142
142 template<class CallbackInfo, class Wrappable> 143 template<class CallbackInfo, class Wrappable>
143 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stEventConstructor > impl, Wrappable* wrappable) 144 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<No nCoreTestInterface > impl, Wrappable* wrappable)
144 { 145 {
145 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 146 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
146 } 147 }
147 148
148 bool fillTestEventConstructorInit(TestEventConstructorInit&, const Dictionary&);
149
150 } 149 }
151 150
152 #endif // V8TestEventConstructor_h 151 #endif // V8NonCoreTestInterface_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698