| OLD | NEW |
| (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 V8TestInterfacePython_h | |
| 8 #define V8TestInterfacePython_h | |
| 9 | |
| 10 #if ENABLE(CONDITION) | |
| 11 #include "V8TestInterfaceEmpty.h" | |
| 12 #include "bindings/tests/idls/TestInterfacePythonImplementation.h" | |
| 13 #include "bindings/v8/V8Binding.h" | |
| 14 #include "bindings/v8/V8DOMWrapper.h" | |
| 15 #include "bindings/v8/WrapperTypeInfo.h" | |
| 16 #include "heap/Handle.h" | |
| 17 | |
| 18 namespace WebCore { | |
| 19 | |
| 20 class V8TestInterfacePython { | |
| 21 public: | |
| 22 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); | |
| 23 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va
lue>, v8::Isolate*); | |
| 24 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); | |
| 25 static TestInterfacePythonImplementation* toNative(v8::Handle<v8::Object> ob
ject) | |
| 26 { | |
| 27 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); | |
| 28 } | |
| 29 static TestInterfacePythonImplementation* toNativeWithTypeCheck(v8::Isolate*
, v8::Handle<v8::Value>); | |
| 30 static const WrapperTypeInfo wrapperTypeInfo; | |
| 31 static void derefObject(void*); | |
| 32 static void visitDOMWrapper(void*, const v8::Persistent<v8::Object>&, v8::Is
olate*); | |
| 33 static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>); | |
| 34 static void implementsCustomVoidMethodMethodCustom(const v8::FunctionCallbac
kInfo<v8::Value>&); | |
| 35 static void legacyCallCustom(const v8::FunctionCallbackInfo<v8::Value>&); | |
| 36 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; | |
| 37 static inline void* toInternalPointer(TestInterfacePythonImplementation* imp
l) | |
| 38 { | |
| 39 return V8TestInterfaceEmpty::toInternalPointer(impl); | |
| 40 } | |
| 41 | |
| 42 static inline TestInterfacePythonImplementation* fromInternalPointer(void* o
bject) | |
| 43 { | |
| 44 return static_cast<TestInterfacePythonImplementation*>(V8TestInterfaceEm
pty::fromInternalPointer(object)); | |
| 45 } | |
| 46 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfacePythonImplementation*, v8::Isolate*); | |
| 47 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } | |
| 48 | |
| 49 private: | |
| 50 }; | |
| 51 | |
| 52 class TestInterfacePythonImplementation; | |
| 53 v8::Handle<v8::Value> toV8(TestInterfacePythonImplementation*, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate*); | |
| 54 | |
| 55 template<class CallbackInfo> | |
| 56 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfacePyth
onImplementation* impl) | |
| 57 { | |
| 58 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | |
| 59 } | |
| 60 | |
| 61 template<class CallbackInfo> | |
| 62 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI
nterfacePythonImplementation* impl) | |
| 63 { | |
| 64 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackIn
fo.GetIsolate())); | |
| 65 } | |
| 66 | |
| 67 template<class CallbackInfo, class Wrappable> | |
| 68 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface
PythonImplementation* impl, Wrappable*) | |
| 69 { | |
| 70 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackIn
fo.GetIsolate())); | |
| 71 } | |
| 72 | |
| 73 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfacePythonImplementation>
impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | |
| 74 { | |
| 75 return toV8(impl.get(), creationContext, isolate); | |
| 76 } | |
| 77 | |
| 78 template<class CallbackInfo> | |
| 79 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn
terfacePythonImplementation> impl) | |
| 80 { | |
| 81 v8SetReturnValue(callbackInfo, impl.get()); | |
| 82 } | |
| 83 | |
| 84 template<class CallbackInfo> | |
| 85 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<TestInterfacePythonImplementation> impl) | |
| 86 { | |
| 87 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); | |
| 88 } | |
| 89 | |
| 90 template<class CallbackInfo, class Wrappable> | |
| 91 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stInterfacePythonImplementation> impl, Wrappable* wrappable) | |
| 92 { | |
| 93 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | |
| 94 } | |
| 95 | |
| 96 } | |
| 97 #endif // ENABLE(CONDITION) | |
| 98 #endif // V8TestInterfacePython_h | |
| OLD | NEW |