OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
6 | 6 |
7 #ifndef V8TestInterface_h | 7 #ifndef V8TestInterfacePython_h |
8 #define V8TestInterface_h | 8 #define V8TestInterfacePython_h |
9 | 9 |
10 #if ENABLE(CONDITION) | 10 #if ENABLE(CONDITION) |
11 #include "V8TestInterfaceEmpty.h" | 11 #include "V8TestInterfaceEmpty.h" |
12 #include "bindings/tests/idls/TestInterfaceImplementation.h" | 12 #include "bindings/tests/idls/TestInterfacePythonImplementation.h" |
13 #include "bindings/v8/V8Binding.h" | 13 #include "bindings/v8/V8Binding.h" |
14 #include "bindings/v8/V8DOMWrapper.h" | 14 #include "bindings/v8/V8DOMWrapper.h" |
15 #include "bindings/v8/WrapperTypeInfo.h" | 15 #include "bindings/v8/WrapperTypeInfo.h" |
16 #include "heap/Handle.h" | 16 #include "heap/Handle.h" |
17 | 17 |
18 namespace WebCore { | 18 namespace WebCore { |
19 | 19 |
20 class V8TestInterface { | 20 class V8TestInterfacePython { |
21 public: | 21 public: |
22 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); | 22 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); |
23 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va
lue>, 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*); | 24 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); |
25 static TestInterfaceImplementation* toNative(v8::Handle<v8::Object> object) | 25 static TestInterfacePythonImplementation* toNative(v8::Handle<v8::Object> ob
ject) |
26 { | 26 { |
27 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); | 27 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); |
28 } | 28 } |
29 static TestInterfaceImplementation* toNativeWithTypeCheck(v8::Isolate*, v8::
Handle<v8::Value>); | 29 static TestInterfacePythonImplementation* toNativeWithTypeCheck(v8::Isolate*
, v8::Handle<v8::Value>); |
30 static const WrapperTypeInfo wrapperTypeInfo; | 30 static const WrapperTypeInfo wrapperTypeInfo; |
31 static void derefObject(void*); | 31 static void derefObject(void*); |
32 static void visitDOMWrapper(void*, const v8::Persistent<v8::Object>&, v8::Is
olate*); | 32 static void visitDOMWrapper(void*, const v8::Persistent<v8::Object>&, v8::Is
olate*); |
33 static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>); | 33 static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>); |
34 static void implementsCustomVoidMethodMethodCustom(const v8::FunctionCallbac
kInfo<v8::Value>&); | 34 static void implementsCustomVoidMethodMethodCustom(const v8::FunctionCallbac
kInfo<v8::Value>&); |
35 static void legacyCallCustom(const v8::FunctionCallbackInfo<v8::Value>&); | 35 static void legacyCallCustom(const v8::FunctionCallbackInfo<v8::Value>&); |
36 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; | 36 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; |
37 static inline void* toInternalPointer(TestInterfaceImplementation* impl) | 37 static inline void* toInternalPointer(TestInterfacePythonImplementation* imp
l) |
38 { | 38 { |
39 return V8TestInterfaceEmpty::toInternalPointer(impl); | 39 return V8TestInterfaceEmpty::toInternalPointer(impl); |
40 } | 40 } |
41 | 41 |
42 static inline TestInterfaceImplementation* fromInternalPointer(void* object) | 42 static inline TestInterfacePythonImplementation* fromInternalPointer(void* o
bject) |
43 { | 43 { |
44 return static_cast<TestInterfaceImplementation*>(V8TestInterfaceEmpty::f
romInternalPointer(object)); | 44 return static_cast<TestInterfacePythonImplementation*>(V8TestInterfaceEm
pty::fromInternalPointer(object)); |
45 } | 45 } |
46 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfaceImplementation*, v8::Isolate*); | 46 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfacePythonImplementation*, v8::Isolate*); |
47 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*); | 47 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } |
48 | 48 |
49 private: | 49 private: |
50 }; | 50 }; |
51 | 51 |
52 class TestInterfaceImplementation; | 52 class TestInterfacePythonImplementation; |
53 v8::Handle<v8::Value> toV8(TestInterfaceImplementation*, v8::Handle<v8::Object>
creationContext, v8::Isolate*); | 53 v8::Handle<v8::Value> toV8(TestInterfacePythonImplementation*, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate*); |
54 | 54 |
55 template<class CallbackInfo> | 55 template<class CallbackInfo> |
56 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceImpl
ementation* impl) | 56 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfacePyth
onImplementation* impl) |
57 { | 57 { |
58 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 58 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
59 } | 59 } |
60 | 60 |
61 template<class CallbackInfo> | 61 template<class CallbackInfo> |
62 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI
nterfaceImplementation* impl) | 62 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI
nterfacePythonImplementation* impl) |
63 { | 63 { |
64 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackIn
fo.GetIsolate())); | 64 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackIn
fo.GetIsolate())); |
65 } | 65 } |
66 | 66 |
67 template<class CallbackInfo, class Wrappable> | 67 template<class CallbackInfo, class Wrappable> |
68 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface
Implementation* impl, Wrappable*) | 68 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface
PythonImplementation* impl, Wrappable*) |
69 { | 69 { |
70 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackIn
fo.GetIsolate())); | 70 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackIn
fo.GetIsolate())); |
71 } | 71 } |
72 | 72 |
73 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfaceImplementation> impl,
v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 73 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfacePythonImplementation>
impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
74 { | 74 { |
75 return toV8(impl.get(), creationContext, isolate); | 75 return toV8(impl.get(), creationContext, isolate); |
76 } | 76 } |
77 | 77 |
78 template<class CallbackInfo> | 78 template<class CallbackInfo> |
79 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn
terfaceImplementation> impl) | 79 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn
terfacePythonImplementation> impl) |
80 { | 80 { |
81 v8SetReturnValue(callbackInfo, impl.get()); | 81 v8SetReturnValue(callbackInfo, impl.get()); |
82 } | 82 } |
83 | 83 |
84 template<class CallbackInfo> | 84 template<class CallbackInfo> |
85 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<TestInterfaceImplementation> impl) | 85 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<TestInterfacePythonImplementation> impl) |
86 { | 86 { |
87 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); | 87 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); |
88 } | 88 } |
89 | 89 |
90 template<class CallbackInfo, class Wrappable> | 90 template<class CallbackInfo, class Wrappable> |
91 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stInterfaceImplementation> impl, Wrappable* wrappable) | 91 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stInterfacePythonImplementation> impl, Wrappable* wrappable) |
92 { | 92 { |
93 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 93 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
94 } | 94 } |
95 | 95 |
96 } | 96 } |
97 #endif // ENABLE(CONDITION) | 97 #endif // ENABLE(CONDITION) |
98 #endif // V8TestInterface_h | 98 #endif // V8TestInterfacePython_h |
OLD | NEW |