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

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

Issue 213543004: Consolidate IDL test cases (15%: 34 => 29) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reupload Created 6 years, 9 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6
7 #ifndef V8TestObjectPython_h
8 #define V8TestObjectPython_h
9
10 #include "bindings/tests/idls/TestObjectPython.h"
11 #include "bindings/v8/V8Binding.h"
12 #include "bindings/v8/V8DOMWrapper.h"
13 #include "bindings/v8/WrapperTypeInfo.h"
14 #include "heap/Handle.h"
15
16 namespace WebCore {
17
18 class V8TestObjectPython {
19 public:
20 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*);
21 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va lue>, v8::Isolate*);
22 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*);
23 static TestObjectPython* toNative(v8::Handle<v8::Object> object)
24 {
25 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex));
26 }
27 static TestObjectPython* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8:: Value>);
28 static const WrapperTypeInfo wrapperTypeInfo;
29 static void derefObject(void*);
30 static void customVoidMethodMethodCustom(const v8::FunctionCallbackInfo<v8:: Value>&);
31 #if ENABLE(CONDITION)
32 static void conditionalConditionCustomVoidMethodMethodCustom(const v8::Funct ionCallbackInfo<v8::Value>&);
33 #endif // ENABLE(CONDITION)
34 static void customObjectAttributeAttributeGetterCustom(const v8::PropertyCal lbackInfo<v8::Value>&);
35 static void customObjectAttributeAttributeSetterCustom(v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&);
36 static void customGetterLongAttributeAttributeGetterCustom(const v8::Propert yCallbackInfo<v8::Value>&);
37 static void customGetterReadonlyObjectAttributeAttributeGetterCustom(const v 8::PropertyCallbackInfo<v8::Value>&);
38 static void customSetterLongAttributeAttributeSetterCustom(v8::Local<v8::Val ue>, const v8::PropertyCallbackInfo<void>&);
39 #if ENABLE(CONDITION)
40 static void customLongAttributeAttributeGetterCustom(const v8::PropertyCallb ackInfo<v8::Value>&);
41 #endif // ENABLE(CONDITION)
42 #if ENABLE(CONDITION)
43 static void customLongAttributeAttributeSetterCustom(v8::Local<v8::Value>, c onst v8::PropertyCallbackInfo<void>&);
44 #endif // ENABLE(CONDITION)
45 static void customImplementedAsLongAttributeAttributeGetterCustom(const v8:: PropertyCallbackInfo<v8::Value>&);
46 static void customImplementedAsLongAttributeAttributeSetterCustom(v8::Local< v8::Value>, const v8::PropertyCallbackInfo<void>&);
47 static void customGetterImplementedAsLongAttributeAttributeGetterCustom(cons t v8::PropertyCallbackInfo<v8::Value>&);
48 static void customSetterImplementedAsLongAttributeAttributeSetterCustom(v8:: Local<v8::Value>, const v8::PropertyCallbackInfo<void>&);
49 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
50 static inline void* toInternalPointer(TestObjectPython* impl)
51 {
52 return impl;
53 }
54
55 static inline TestObjectPython* fromInternalPointer(void* object)
56 {
57 return static_cast<TestObjectPython*>(object);
58 }
59 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestO bjectPython*, v8::Isolate*);
60 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*);
61
62 private:
63 friend v8::Handle<v8::Object> wrap(TestObjectPython*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
64 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObjectPython>, v8 ::Handle<v8::Object> creationContext, v8::Isolate*);
65 };
66
67 inline v8::Handle<v8::Object> wrap(TestObjectPython* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate)
68 {
69 ASSERT(impl);
70 ASSERT(!DOMDataStore::containsWrapper<V8TestObjectPython>(impl, isolate));
71 return V8TestObjectPython::createWrapper(impl, creationContext, isolate);
72 }
73
74 inline v8::Handle<v8::Value> toV8(TestObjectPython* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
75 {
76 if (UNLIKELY(!impl))
77 return v8::Null(isolate);
78 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestObjectPython> (impl, isolate);
79 if (!wrapper.IsEmpty())
80 return wrapper;
81 return wrap(impl, creationContext, isolate);
82 }
83
84 template<typename CallbackInfo>
85 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestObjectPython* impl)
86 {
87 if (UNLIKELY(!impl)) {
88 v8SetReturnValueNull(callbackInfo);
89 return;
90 }
91 if (DOMDataStore::setReturnValueFromWrapper<V8TestObjectPython>(callbackInfo .GetReturnValue(), impl))
92 return;
93 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
94 v8SetReturnValue(callbackInfo, wrapper);
95 }
96
97 template<typename CallbackInfo>
98 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestO bjectPython* impl)
99 {
100 ASSERT(DOMWrapperWorld::current(callbackInfo.GetIsolate()).isMainWorld());
101 if (UNLIKELY(!impl)) {
102 v8SetReturnValueNull(callbackInfo);
103 return;
104 }
105 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestObjectPython>( callbackInfo.GetReturnValue(), impl))
106 return;
107 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate());
108 v8SetReturnValue(callbackInfo, wrapper);
109 }
110
111 template<class CallbackInfo, class Wrappable>
112 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestObjectPyt hon* impl, Wrappable* wrappable)
113 {
114 if (UNLIKELY(!impl)) {
115 v8SetReturnValueNull(callbackInfo);
116 return;
117 }
118 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestObjectPython>(callback Info.GetReturnValue(), impl, callbackInfo.Holder(), wrappable))
119 return;
120 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
121 v8SetReturnValue(callbackInfo, wrapper);
122 }
123
124 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestObjectPython> impl, v8::Handle< v8::Object> creationContext, v8::Isolate* isolate)
125 {
126 return toV8(impl.get(), creationContext, isolate);
127 }
128
129 template<class CallbackInfo>
130 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestOb jectPython> impl)
131 {
132 v8SetReturnValue(callbackInfo, impl.get());
133 }
134
135 template<class CallbackInfo>
136 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestObjectPython> impl)
137 {
138 v8SetReturnValueForMainWorld(callbackInfo, impl.get());
139 }
140
141 template<class CallbackInfo, class Wrappable>
142 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stObjectPython> impl, Wrappable* wrappable)
143 {
144 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
145 }
146
147 }
148 #endif // V8TestObjectPython_h
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | Source/bindings/tests/results/V8TestObjectPython.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698