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 V8TestObject_h | 7 #ifndef V8TestObject_h |
8 #define V8TestObject_h | 8 #define V8TestObject_h |
9 | 9 |
10 #include "bindings/core/v8/V8Binding.h" | 10 #include "bindings/core/v8/V8Binding.h" |
11 #include "bindings/core/v8/V8DOMWrapper.h" | 11 #include "bindings/core/v8/V8DOMWrapper.h" |
12 #include "bindings/core/v8/WrapperTypeInfo.h" | 12 #include "bindings/core/v8/WrapperTypeInfo.h" |
13 #include "bindings/tests/idls/TestObject.h" | 13 #include "bindings/tests/idls/TestObject.h" |
14 #include "platform/heap/Handle.h" | 14 #include "platform/heap/Handle.h" |
15 | 15 |
16 namespace blink { | 16 namespace blink { |
17 | 17 |
18 class V8TestObject { | 18 class V8TestObject { |
19 public: | 19 public: |
| 20 class PrivateScript { |
| 21 public: |
| 22 static bool voidMethodImplementedInPrivateScriptMethod(LocalFrame* frame
, TestObject* holderImpl); |
| 23 static bool shortMethodImplementedInPrivateScriptMethod(LocalFrame* fram
e, TestObject* holderImpl, int* result); |
| 24 static bool shortMethodWithShortArgumentImplementedInPrivateScriptMethod
(LocalFrame* frame, TestObject* holderImpl, int value, int* result); |
| 25 static bool stringMethodWithStringArgumentImplementedInPrivateScriptMeth
od(LocalFrame* frame, TestObject* holderImpl, String value, String* result); |
| 26 static bool nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(L
ocalFrame* frame, TestObject* holderImpl, PassRefPtrWillBeRawPtr<Node> value, Re
fPtrWillBeRawPtr<Node>* result); |
| 27 static bool nodeMethodWithVariousArgumentsImplementedInPrivateScriptMeth
od(LocalFrame* frame, TestObject* holderImpl, PassRefPtrWillBeRawPtr<Document> d
ocument, PassRefPtrWillBeRawPtr<Node> node, int value1, double value2, String st
ring, RefPtrWillBeRawPtr<Node>* result); |
| 28 static bool methodForPrivateScriptOnlyMethod(LocalFrame* frame, TestObje
ct* holderImpl, int value1, int value2, int* result); |
| 29 static bool readonlyShortAttributeAttributeGetter(LocalFrame* frame, Tes
tObject* holderImpl, int* result); |
| 30 static bool shortAttributeAttributeGetter(LocalFrame* frame, TestObject*
holderImpl, int* result); |
| 31 static bool shortAttributeAttributeSetter(LocalFrame* frame, TestObject*
holderImpl, int cppValue); |
| 32 static bool stringAttributeAttributeGetter(LocalFrame* frame, TestObject
* holderImpl, String* result); |
| 33 static bool stringAttributeAttributeSetter(LocalFrame* frame, TestObject
* holderImpl, String cppValue); |
| 34 static bool nodeAttributeAttributeGetter(LocalFrame* frame, TestObject*
holderImpl, RefPtrWillBeRawPtr<Node>* result); |
| 35 static bool nodeAttributeAttributeSetter(LocalFrame* frame, TestObject*
holderImpl, PassRefPtrWillBeRawPtr<Node> cppValue); |
| 36 static bool attributeForPrivateScriptOnlyAttributeGetter(LocalFrame* fra
me, TestObject* holderImpl, String* result); |
| 37 static bool attributeForPrivateScriptOnlyAttributeSetter(LocalFrame* fra
me, TestObject* holderImpl, String cppValue); |
| 38 }; |
| 39 |
20 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); | 40 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); |
21 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va
lue>, v8::Isolate*); | 41 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va
lue>, v8::Isolate*); |
22 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); | 42 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); |
23 static TestObject* toNative(v8::Handle<v8::Object> object) | 43 static TestObject* toNative(v8::Handle<v8::Object> object) |
24 { | 44 { |
25 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); | 45 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); |
26 } | 46 } |
27 static TestObject* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>
); | 47 static TestObject* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>
); |
28 static const WrapperTypeInfo wrapperTypeInfo; | 48 static const WrapperTypeInfo wrapperTypeInfo; |
29 static void derefObject(void*); | 49 static void derefObject(void*); |
30 static void customVoidMethodMethodCustom(const v8::FunctionCallbackInfo<v8::
Value>&); | 50 static void customVoidMethodMethodCustom(const v8::FunctionCallbackInfo<v8::
Value>&); |
31 #if ENABLE(CONDITION) | 51 #if ENABLE(CONDITION) |
32 static void conditionalConditionCustomVoidMethodMethodCustom(const v8::Funct
ionCallbackInfo<v8::Value>&); | 52 static void conditionalConditionCustomVoidMethodMethodCustom(const v8::Funct
ionCallbackInfo<v8::Value>&); |
33 #endif // ENABLE(CONDITION) | 53 #endif // ENABLE(CONDITION) |
34 static bool voidMethodImplementedInPrivateScriptMethodImplementedInPrivateSc
ript(LocalFrame* frame, TestObject* holderImpl); | |
35 static bool shortMethodImplementedInPrivateScriptMethodImplementedInPrivateS
cript(LocalFrame* frame, TestObject* holderImpl, int* result); | |
36 static bool shortMethodWithShortArgumentImplementedInPrivateScriptMethodImpl
ementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, int value, int
* result); | |
37 static bool stringMethodWithStringArgumentImplementedInPrivateScriptMethodIm
plementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, String value
, String* result); | |
38 static bool nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodImplem
entedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, PassRefPtrWillBe
RawPtr<Node> value, RefPtrWillBeRawPtr<Node>* result); | |
39 static bool nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodIm
plementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, PassRefPtrWi
llBeRawPtr<Document> document, PassRefPtrWillBeRawPtr<Node> node, int value1, do
uble value2, String string, RefPtrWillBeRawPtr<Node>* result); | |
40 static bool methodForPrivateScriptOnlyMethodImplementedInPrivateScript(Local
Frame* frame, TestObject* holderImpl, int value1, int value2, int* result); | |
41 static void customObjectAttributeAttributeGetterCustom(const v8::PropertyCal
lbackInfo<v8::Value>&); | 54 static void customObjectAttributeAttributeGetterCustom(const v8::PropertyCal
lbackInfo<v8::Value>&); |
42 static void customObjectAttributeAttributeSetterCustom(v8::Local<v8::Value>,
const v8::PropertyCallbackInfo<void>&); | 55 static void customObjectAttributeAttributeSetterCustom(v8::Local<v8::Value>,
const v8::PropertyCallbackInfo<void>&); |
43 static void customGetterLongAttributeAttributeGetterCustom(const v8::Propert
yCallbackInfo<v8::Value>&); | 56 static void customGetterLongAttributeAttributeGetterCustom(const v8::Propert
yCallbackInfo<v8::Value>&); |
44 static void customGetterReadonlyObjectAttributeAttributeGetterCustom(const v
8::PropertyCallbackInfo<v8::Value>&); | 57 static void customGetterReadonlyObjectAttributeAttributeGetterCustom(const v
8::PropertyCallbackInfo<v8::Value>&); |
45 static void customSetterLongAttributeAttributeSetterCustom(v8::Local<v8::Val
ue>, const v8::PropertyCallbackInfo<void>&); | 58 static void customSetterLongAttributeAttributeSetterCustom(v8::Local<v8::Val
ue>, const v8::PropertyCallbackInfo<void>&); |
46 #if ENABLE(CONDITION) | 59 #if ENABLE(CONDITION) |
47 static void customLongAttributeAttributeGetterCustom(const v8::PropertyCallb
ackInfo<v8::Value>&); | 60 static void customLongAttributeAttributeGetterCustom(const v8::PropertyCallb
ackInfo<v8::Value>&); |
48 #endif // ENABLE(CONDITION) | 61 #endif // ENABLE(CONDITION) |
49 #if ENABLE(CONDITION) | 62 #if ENABLE(CONDITION) |
50 static void customLongAttributeAttributeSetterCustom(v8::Local<v8::Value>, c
onst v8::PropertyCallbackInfo<void>&); | 63 static void customLongAttributeAttributeSetterCustom(v8::Local<v8::Value>, c
onst v8::PropertyCallbackInfo<void>&); |
51 #endif // ENABLE(CONDITION) | 64 #endif // ENABLE(CONDITION) |
52 static void customImplementedAsLongAttributeAttributeGetterCustom(const v8::
PropertyCallbackInfo<v8::Value>&); | 65 static void customImplementedAsLongAttributeAttributeGetterCustom(const v8::
PropertyCallbackInfo<v8::Value>&); |
53 static void customImplementedAsLongAttributeAttributeSetterCustom(v8::Local<
v8::Value>, const v8::PropertyCallbackInfo<void>&); | 66 static void customImplementedAsLongAttributeAttributeSetterCustom(v8::Local<
v8::Value>, const v8::PropertyCallbackInfo<void>&); |
54 static void customGetterImplementedAsLongAttributeAttributeGetterCustom(cons
t v8::PropertyCallbackInfo<v8::Value>&); | 67 static void customGetterImplementedAsLongAttributeAttributeGetterCustom(cons
t v8::PropertyCallbackInfo<v8::Value>&); |
55 static void customSetterImplementedAsLongAttributeAttributeSetterCustom(v8::
Local<v8::Value>, const v8::PropertyCallbackInfo<void>&); | 68 static void customSetterImplementedAsLongAttributeAttributeSetterCustom(v8::
Local<v8::Value>, const v8::PropertyCallbackInfo<void>&); |
56 static bool readonlyShortAttributeAttributeGetterImplementedInPrivateScript(
LocalFrame* frame, TestObject* holderImpl, int* result); | |
57 static bool shortAttributeAttributeGetterImplementedInPrivateScript(LocalFra
me* frame, TestObject* holderImpl, int* result); | |
58 static bool shortAttributeAttributeSetterImplementedInPrivateScript(LocalFra
me* frame, TestObject* holderImpl, int cppValue); | |
59 static bool stringAttributeAttributeGetterImplementedInPrivateScript(LocalFr
ame* frame, TestObject* holderImpl, String* result); | |
60 static bool stringAttributeAttributeSetterImplementedInPrivateScript(LocalFr
ame* frame, TestObject* holderImpl, String cppValue); | |
61 static bool nodeAttributeAttributeGetterImplementedInPrivateScript(LocalFram
e* frame, TestObject* holderImpl, RefPtrWillBeRawPtr<Node>* result); | |
62 static bool nodeAttributeAttributeSetterImplementedInPrivateScript(LocalFram
e* frame, TestObject* holderImpl, PassRefPtrWillBeRawPtr<Node> cppValue); | |
63 static bool attributeForPrivateScriptOnlyAttributeGetterImplementedInPrivate
Script(LocalFrame* frame, TestObject* holderImpl, String* result); | |
64 static bool attributeForPrivateScriptOnlyAttributeSetterImplementedInPrivate
Script(LocalFrame* frame, TestObject* holderImpl, String cppValue); | |
65 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; | 69 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; |
66 static inline void* toInternalPointer(TestObject* impl) | 70 static inline void* toInternalPointer(TestObject* impl) |
67 { | 71 { |
68 return impl; | 72 return impl; |
69 } | 73 } |
70 | 74 |
71 static inline TestObject* fromInternalPointer(void* object) | 75 static inline TestObject* fromInternalPointer(void* object) |
72 { | 76 { |
73 return static_cast<TestObject*>(object); | 77 return static_cast<TestObject*>(object); |
74 } | 78 } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 } | 154 } |
151 | 155 |
152 template<class CallbackInfo, class Wrappable> | 156 template<class CallbackInfo, class Wrappable> |
153 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stObject> impl, Wrappable* wrappable) | 157 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stObject> impl, Wrappable* wrappable) |
154 { | 158 { |
155 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 159 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
156 } | 160 } |
157 | 161 |
158 } | 162 } |
159 #endif // V8TestObject_h | 163 #endif // V8TestObject_h |
OLD | NEW |