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/ScriptWrappable.h" |
10 #include "bindings/core/v8/V8Binding.h" | 11 #include "bindings/core/v8/V8Binding.h" |
11 #include "bindings/core/v8/V8DOMWrapper.h" | 12 #include "bindings/core/v8/V8DOMWrapper.h" |
12 #include "bindings/core/v8/WrapperTypeInfo.h" | 13 #include "bindings/core/v8/WrapperTypeInfo.h" |
13 #include "bindings/tests/idls/TestObject.h" | 14 #include "bindings/tests/idls/TestObject.h" |
14 #include "platform/heap/Handle.h" | 15 #include "platform/heap/Handle.h" |
15 | 16 |
16 namespace blink { | 17 namespace blink { |
17 | 18 |
18 class V8TestObject { | 19 class V8TestObject { |
19 public: | 20 public: |
20 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); | 21 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::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va
lue>, v8::Isolate*); |
22 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); | 23 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); |
23 static TestObject* toNative(v8::Handle<v8::Object> object) | 24 static TestObject* toNative(v8::Handle<v8::Object> object) |
24 { | 25 { |
25 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); | 26 return fromInternalPointer(blink::toInternalPointer(object)); |
26 } | 27 } |
27 static TestObject* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>
); | 28 static TestObject* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>
); |
28 static const WrapperTypeInfo wrapperTypeInfo; | 29 static const WrapperTypeInfo wrapperTypeInfo; |
29 static void derefObject(void*); | 30 static void derefObject(ScriptWrappableBase* internalPointer); |
30 static void customVoidMethodMethodCustom(const v8::FunctionCallbackInfo<v8::
Value>&); | 31 static void customVoidMethodMethodCustom(const v8::FunctionCallbackInfo<v8::
Value>&); |
31 #if ENABLE(CONDITION) | 32 #if ENABLE(CONDITION) |
32 static void conditionalConditionCustomVoidMethodMethodCustom(const v8::Funct
ionCallbackInfo<v8::Value>&); | 33 static void conditionalConditionCustomVoidMethodMethodCustom(const v8::Funct
ionCallbackInfo<v8::Value>&); |
33 #endif // ENABLE(CONDITION) | 34 #endif // ENABLE(CONDITION) |
34 static bool voidMethodImplementedInPrivateScriptMethodImplementedInPrivateSc
ript(LocalFrame* frame, TestObject* holderImpl); | 35 static bool voidMethodImplementedInPrivateScriptMethodImplementedInPrivateSc
ript(LocalFrame* frame, TestObject* holderImpl); |
35 static bool shortMethodImplementedInPrivateScriptMethodImplementedInPrivateS
cript(LocalFrame* frame, TestObject* holderImpl, int* result); | 36 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 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 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 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 nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodIm
plementedInPrivateScript(LocalFrame* frame, TestObject* holderImpl, PassRefPtrWi
llBeRawPtr<Document> document, PassRefPtrWillBeRawPtr<Node> node, int value1, do
uble value2, String string, RefPtrWillBeRawPtr<Node>* result); |
(...skipping 16 matching lines...) Expand all Loading... |
56 static bool readonlyShortAttributeAttributeGetterImplementedInPrivateScript(
LocalFrame* frame, TestObject* holderImpl, int* result); | 57 static bool readonlyShortAttributeAttributeGetterImplementedInPrivateScript(
LocalFrame* frame, TestObject* holderImpl, int* result); |
57 static bool shortAttributeAttributeGetterImplementedInPrivateScript(LocalFra
me* frame, TestObject* holderImpl, int* result); | 58 static bool shortAttributeAttributeGetterImplementedInPrivateScript(LocalFra
me* frame, TestObject* holderImpl, int* result); |
58 static bool shortAttributeAttributeSetterImplementedInPrivateScript(LocalFra
me* frame, TestObject* holderImpl, int cppValue); | 59 static bool shortAttributeAttributeSetterImplementedInPrivateScript(LocalFra
me* frame, TestObject* holderImpl, int cppValue); |
59 static bool stringAttributeAttributeGetterImplementedInPrivateScript(LocalFr
ame* frame, TestObject* holderImpl, String* result); | 60 static bool stringAttributeAttributeGetterImplementedInPrivateScript(LocalFr
ame* frame, TestObject* holderImpl, String* result); |
60 static bool stringAttributeAttributeSetterImplementedInPrivateScript(LocalFr
ame* frame, TestObject* holderImpl, String cppValue); | 61 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 nodeAttributeAttributeGetterImplementedInPrivateScript(LocalFram
e* frame, TestObject* holderImpl, RefPtrWillBeRawPtr<Node>* result); |
62 static bool nodeAttributeAttributeSetterImplementedInPrivateScript(LocalFram
e* frame, TestObject* holderImpl, PassRefPtrWillBeRawPtr<Node> cppValue); | 63 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 attributeForPrivateScriptOnlyAttributeGetterImplementedInPrivate
Script(LocalFrame* frame, TestObject* holderImpl, String* result); |
64 static bool attributeForPrivateScriptOnlyAttributeSetterImplementedInPrivate
Script(LocalFrame* frame, TestObject* holderImpl, String cppValue); | 65 static bool attributeForPrivateScriptOnlyAttributeSetterImplementedInPrivate
Script(LocalFrame* frame, TestObject* holderImpl, String cppValue); |
65 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; | 66 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; |
66 static inline void* toInternalPointer(TestObject* impl) | 67 static inline ScriptWrappableBase* toInternalPointer(TestObject* impl) |
67 { | 68 { |
68 return impl; | 69 return reinterpret_cast<ScriptWrappableBase*>(static_cast<void*>(impl)); |
69 } | 70 } |
70 | 71 |
71 static inline TestObject* fromInternalPointer(void* object) | 72 static inline TestObject* fromInternalPointer(ScriptWrappableBase* internalP
ointer) |
72 { | 73 { |
73 return static_cast<TestObject*>(object); | 74 return reinterpret_cast<TestObject*>(static_cast<void*>(internalPointer)
); |
74 } | 75 } |
75 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestO
bject*, v8::Isolate*); | 76 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestO
bject*, v8::Isolate*); |
76 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*); | 77 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*); |
77 | 78 |
78 private: | 79 private: |
79 friend v8::Handle<v8::Object> wrap(TestObject*, v8::Handle<v8::Object> creat
ionContext, v8::Isolate*); | 80 friend v8::Handle<v8::Object> wrap(TestObject*, v8::Handle<v8::Object> creat
ionContext, v8::Isolate*); |
80 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObject>, v8::Hand
le<v8::Object> creationContext, v8::Isolate*); | 81 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObject>, v8::Hand
le<v8::Object> creationContext, v8::Isolate*); |
81 }; | 82 }; |
82 | 83 |
83 v8::Handle<v8::Object> wrap(TestObject* impl, v8::Handle<v8::Object> creationCon
text, v8::Isolate*); | 84 v8::Handle<v8::Object> wrap(TestObject* impl, v8::Handle<v8::Object> creationCon
text, v8::Isolate*); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 } | 151 } |
151 | 152 |
152 template<class CallbackInfo, class Wrappable> | 153 template<class CallbackInfo, class Wrappable> |
153 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stObject> impl, Wrappable* wrappable) | 154 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stObject> impl, Wrappable* wrappable) |
154 { | 155 { |
155 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 156 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
156 } | 157 } |
157 | 158 |
158 } | 159 } |
159 #endif // V8TestObject_h | 160 #endif // V8TestObject_h |
OLD | NEW |