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

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

Issue 14882009: Remove DOM prefix from several IDL interfaces (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 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 V8TestObj_h 21 #ifndef V8TestObject_h
22 #define V8TestObj_h 22 #define V8TestObject_h
23 23
24 #include "bindings/bindings/tests/idls/TestObj.h" 24 #include "bindings/bindings/tests/idls/TestObj.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 #include "wtf/HashMap.h" 28 #include "wtf/HashMap.h"
29 #include "wtf/text/StringHash.h" 29 #include "wtf/text/StringHash.h"
30 #include <v8.h> 30 #include <v8.h>
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 class V8TestObj { 34 class V8TestObject {
35 public: 35 public:
36 static const bool hasDependentLifetime = false; 36 static const bool hasDependentLifetime = false;
37 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp e); 37 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp e);
38 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); 38 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*);
39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*, Wrappe rWorldType); 39 static v8::Persistent<v8::FunctionTemplate> GetTemplate(v8::Isolate*, Wrappe rWorldType);
40 static TestObj* toNative(v8::Handle<v8::Object> object) 40 static TestObj* toNative(v8::Handle<v8::Object> object)
41 { 41 {
42 return reinterpret_cast<TestObj*>(object->GetAlignedPointerFromInternalF ield(v8DOMWrapperObjectIndex)); 42 return reinterpret_cast<TestObj*>(object->GetAlignedPointerFromInternalF ield(v8DOMWrapperObjectIndex));
43 } 43 }
44 static void derefObject(void*); 44 static void derefObject(void*);
45 static WrapperTypeInfo info; 45 static WrapperTypeInfo info;
46 static v8::Handle<v8::Value> customMethodMethodCustom(const v8::Arguments&); 46 static v8::Handle<v8::Value> customMethodMethodCustom(const v8::Arguments&);
47 static v8::Handle<v8::Value> customMethodWithArgsMethodCustom(const v8::Argu ments&); 47 static v8::Handle<v8::Value> customMethodWithArgsMethodCustom(const v8::Argu ments&);
48 static v8::Handle<v8::Value> classMethod2MethodCustom(const v8::Arguments&); 48 static v8::Handle<v8::Value> classMethod2MethodCustom(const v8::Arguments&);
49 static v8::Handle<v8::Value> constructorCallback(const v8::Arguments&); 49 static v8::Handle<v8::Value> constructorCallback(const v8::Arguments&);
50 static v8::Handle<v8::Value> customAttrAttrGetterCustom(v8::Local<v8::String > name, const v8::AccessorInfo&); 50 static v8::Handle<v8::Value> customAttrAttrGetterCustom(v8::Local<v8::String > name, const v8::AccessorInfo&);
51 static void customAttrAttrSetterCustom(v8::Local<v8::String> name, v8::Local <v8::Value>, const v8::AccessorInfo&); 51 static void customAttrAttrSetterCustom(v8::Local<v8::String> name, v8::Local <v8::Value>, const v8::AccessorInfo&);
52 static v8::Handle<v8::Value> indexedPropertyGetter(uint32_t, const v8::Acces sorInfo&); 52 static v8::Handle<v8::Value> indexedPropertyGetter(uint32_t, const v8::Acces sorInfo&);
53 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ; 53 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
54 static void installPerContextProperties(v8::Handle<v8::Object>, TestObj*, v8 ::Isolate*); 54 static void installPerContextProperties(v8::Handle<v8::Object>, TestObj*, v8 ::Isolate*);
55 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8: :Isolate*); 55 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8: :Isolate*);
56 private: 56 private:
57 friend v8::Handle<v8::Object> wrap(TestObj*, v8::Handle<v8::Object> creation Context, v8::Isolate*); 57 friend v8::Handle<v8::Object> wrap(TestObj*, v8::Handle<v8::Object> creation Context, v8::Isolate*);
58 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObj>, v8::Handle< v8::Object> creationContext, v8::Isolate*); 58 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObj>, v8::Handle< v8::Object> creationContext, v8::Isolate*);
59 }; 59 };
60 60
61 template<> 61 template<>
62 class WrapperTypeTraits<TestObj > { 62 class WrapperTypeTraits<TestObj > {
63 public: 63 public:
64 static WrapperTypeInfo* info() { return &V8TestObj::info; } 64 static WrapperTypeInfo* info() { return &V8TestObject::info; }
65 }; 65 };
66 66
67 67
68 inline v8::Handle<v8::Object> wrap(TestObj* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate) 68 inline v8::Handle<v8::Object> wrap(TestObj* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate)
69 { 69 {
70 ASSERT(impl); 70 ASSERT(impl);
71 ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty()); 71 ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty());
72 if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) { 72 if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) {
73 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl); 73 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl);
74 // Might be a XXXConstructor::info instead of an XXX::info. These will b oth have 74 // Might be a XXXConstructor::info instead of an XXX::info. These will b oth have
75 // the same object de-ref functions, though, so use that as the basis of the check. 75 // the same object de-ref functions, though, so use that as the basis of the check.
76 RELEASE_ASSERT(actualInfo->derefObjectFunction == V8TestObj::info.derefO bjectFunction); 76 RELEASE_ASSERT(actualInfo->derefObjectFunction == V8TestObject::info.der efObjectFunction);
77 } 77 }
78 return V8TestObj::createWrapper(impl, creationContext, isolate); 78 return V8TestObject::createWrapper(impl, creationContext, isolate);
79 } 79 }
80 80
81 inline v8::Handle<v8::Value> toV8(TestObj* impl, v8::Handle<v8::Object> creation Context, v8::Isolate* isolate) 81 inline v8::Handle<v8::Value> toV8(TestObj* impl, v8::Handle<v8::Object> creation Context, v8::Isolate* isolate)
82 { 82 {
83 if (UNLIKELY(!impl)) 83 if (UNLIKELY(!impl))
84 return v8NullWithCheck(isolate); 84 return v8NullWithCheck(isolate);
85 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate); 85 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate);
86 if (!wrapper.IsEmpty()) 86 if (!wrapper.IsEmpty())
87 return wrapper; 87 return wrapper;
88 return wrap(impl, creationContext, isolate); 88 return wrap(impl, creationContext, isolate);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 return toV8Fast(impl.get(), container, wrappable); 135 return toV8Fast(impl.get(), container, wrappable);
136 } 136 }
137 137
138 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestObj > impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate) 138 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestObj > impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate)
139 { 139 {
140 return toV8(impl.get(), creationContext, isolate); 140 return toV8(impl.get(), creationContext, isolate);
141 } 141 }
142 142
143 } 143 }
144 144
145 #endif // V8TestObj_h 145 #endif // V8TestObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698