| 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: |
| (...skipping 15 matching lines...) Expand all Loading... |
| 35 static bool nodeAttributeAttributeSetter(LocalFrame* frame, TestObject*
holderImpl, PassRefPtrWillBeRawPtr<Node> cppValue); | 36 static bool nodeAttributeAttributeSetter(LocalFrame* frame, TestObject*
holderImpl, PassRefPtrWillBeRawPtr<Node> cppValue); |
| 36 static bool attributeForPrivateScriptOnlyAttributeGetter(LocalFrame* fra
me, TestObject* holderImpl, String* result); | 37 static bool attributeForPrivateScriptOnlyAttributeGetter(LocalFrame* fra
me, TestObject* holderImpl, String* result); |
| 37 static bool attributeForPrivateScriptOnlyAttributeSetter(LocalFrame* fra
me, TestObject* holderImpl, String cppValue); | 38 static bool attributeForPrivateScriptOnlyAttributeSetter(LocalFrame* fra
me, TestObject* holderImpl, String cppValue); |
| 38 }; | 39 }; |
| 39 | 40 |
| 40 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); | 41 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); |
| 41 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va
lue>, v8::Isolate*); | 42 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va
lue>, v8::Isolate*); |
| 42 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); | 43 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); |
| 43 static TestObject* toNative(v8::Handle<v8::Object> object) | 44 static TestObject* toNative(v8::Handle<v8::Object> object) |
| 44 { | 45 { |
| 45 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); | 46 return fromInternalPointer(blink::toInternalPointer(object)); |
| 46 } | 47 } |
| 47 static TestObject* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>
); | 48 static TestObject* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>
); |
| 48 static const WrapperTypeInfo wrapperTypeInfo; | 49 static const WrapperTypeInfo wrapperTypeInfo; |
| 49 static void derefObject(void*); | 50 static void derefObject(ScriptWrappableBase* internalPointer); |
| 50 static void customVoidMethodMethodCustom(const v8::FunctionCallbackInfo<v8::
Value>&); | 51 static void customVoidMethodMethodCustom(const v8::FunctionCallbackInfo<v8::
Value>&); |
| 51 #if ENABLE(CONDITION) | 52 #if ENABLE(CONDITION) |
| 52 static void conditionalConditionCustomVoidMethodMethodCustom(const v8::Funct
ionCallbackInfo<v8::Value>&); | 53 static void conditionalConditionCustomVoidMethodMethodCustom(const v8::Funct
ionCallbackInfo<v8::Value>&); |
| 53 #endif // ENABLE(CONDITION) | 54 #endif // ENABLE(CONDITION) |
| 54 static void customObjectAttributeAttributeGetterCustom(const v8::PropertyCal
lbackInfo<v8::Value>&); | 55 static void customObjectAttributeAttributeGetterCustom(const v8::PropertyCal
lbackInfo<v8::Value>&); |
| 55 static void customObjectAttributeAttributeSetterCustom(v8::Local<v8::Value>,
const v8::PropertyCallbackInfo<void>&); | 56 static void customObjectAttributeAttributeSetterCustom(v8::Local<v8::Value>,
const v8::PropertyCallbackInfo<void>&); |
| 56 static void customGetterLongAttributeAttributeGetterCustom(const v8::Propert
yCallbackInfo<v8::Value>&); | 57 static void customGetterLongAttributeAttributeGetterCustom(const v8::Propert
yCallbackInfo<v8::Value>&); |
| 57 static void customGetterReadonlyObjectAttributeAttributeGetterCustom(const v
8::PropertyCallbackInfo<v8::Value>&); | 58 static void customGetterReadonlyObjectAttributeAttributeGetterCustom(const v
8::PropertyCallbackInfo<v8::Value>&); |
| 58 static void customSetterLongAttributeAttributeSetterCustom(v8::Local<v8::Val
ue>, const v8::PropertyCallbackInfo<void>&); | 59 static void customSetterLongAttributeAttributeSetterCustom(v8::Local<v8::Val
ue>, const v8::PropertyCallbackInfo<void>&); |
| 59 #if ENABLE(CONDITION) | 60 #if ENABLE(CONDITION) |
| 60 static void customLongAttributeAttributeGetterCustom(const v8::PropertyCallb
ackInfo<v8::Value>&); | 61 static void customLongAttributeAttributeGetterCustom(const v8::PropertyCallb
ackInfo<v8::Value>&); |
| 61 #endif // ENABLE(CONDITION) | 62 #endif // ENABLE(CONDITION) |
| 62 #if ENABLE(CONDITION) | 63 #if ENABLE(CONDITION) |
| 63 static void customLongAttributeAttributeSetterCustom(v8::Local<v8::Value>, c
onst v8::PropertyCallbackInfo<void>&); | 64 static void customLongAttributeAttributeSetterCustom(v8::Local<v8::Value>, c
onst v8::PropertyCallbackInfo<void>&); |
| 64 #endif // ENABLE(CONDITION) | 65 #endif // ENABLE(CONDITION) |
| 65 static void customImplementedAsLongAttributeAttributeGetterCustom(const v8::
PropertyCallbackInfo<v8::Value>&); | 66 static void customImplementedAsLongAttributeAttributeGetterCustom(const v8::
PropertyCallbackInfo<v8::Value>&); |
| 66 static void customImplementedAsLongAttributeAttributeSetterCustom(v8::Local<
v8::Value>, const v8::PropertyCallbackInfo<void>&); | 67 static void customImplementedAsLongAttributeAttributeSetterCustom(v8::Local<
v8::Value>, const v8::PropertyCallbackInfo<void>&); |
| 67 static void customGetterImplementedAsLongAttributeAttributeGetterCustom(cons
t v8::PropertyCallbackInfo<v8::Value>&); | 68 static void customGetterImplementedAsLongAttributeAttributeGetterCustom(cons
t v8::PropertyCallbackInfo<v8::Value>&); |
| 68 static void customSetterImplementedAsLongAttributeAttributeSetterCustom(v8::
Local<v8::Value>, const v8::PropertyCallbackInfo<void>&); | 69 static void customSetterImplementedAsLongAttributeAttributeSetterCustom(v8::
Local<v8::Value>, const v8::PropertyCallbackInfo<void>&); |
| 69 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; | 70 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; |
| 70 static inline void* toInternalPointer(TestObject* impl) | 71 static inline ScriptWrappableBase* toInternalPointer(TestObject* impl) |
| 71 { | 72 { |
| 72 return impl; | 73 return reinterpret_cast<ScriptWrappableBase*>(static_cast<void*>(impl)); |
| 73 } | 74 } |
| 74 | 75 |
| 75 static inline TestObject* fromInternalPointer(void* object) | 76 static inline TestObject* fromInternalPointer(ScriptWrappableBase* internalP
ointer) |
| 76 { | 77 { |
| 77 return static_cast<TestObject*>(object); | 78 return reinterpret_cast<TestObject*>(static_cast<void*>(internalPointer)
); |
| 78 } | 79 } |
| 79 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestO
bject*, v8::Isolate*); | 80 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestO
bject*, v8::Isolate*); |
| 80 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*); | 81 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*); |
| 81 | 82 |
| 82 private: | 83 private: |
| 83 friend v8::Handle<v8::Object> wrap(TestObject*, v8::Handle<v8::Object> creat
ionContext, v8::Isolate*); | 84 friend v8::Handle<v8::Object> wrap(TestObject*, v8::Handle<v8::Object> creat
ionContext, v8::Isolate*); |
| 84 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObject>, v8::Hand
le<v8::Object> creationContext, v8::Isolate*); | 85 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObject>, v8::Hand
le<v8::Object> creationContext, v8::Isolate*); |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 v8::Handle<v8::Object> wrap(TestObject* impl, v8::Handle<v8::Object> creationCon
text, v8::Isolate*); | 88 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... |
| 154 } | 155 } |
| 155 | 156 |
| 156 template<class CallbackInfo, class Wrappable> | 157 template<class CallbackInfo, class Wrappable> |
| 157 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stObject> impl, Wrappable* wrappable) | 158 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stObject> impl, Wrappable* wrappable) |
| 158 { | 159 { |
| 159 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 160 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
| 160 } | 161 } |
| 161 | 162 |
| 162 } | 163 } |
| 163 #endif // V8TestObject_h | 164 #endif // V8TestObject_h |
| OLD | NEW |