| OLD | NEW |
| 1 /* | 1 /* |
| 2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
| 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
| 4 | 4 |
| 5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
| 6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
| 7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
| 8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
| 9 | 9 |
| 10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
| 11 but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 Library General Public License for more details. | 13 Library General Public License for more details. |
| 14 | 14 |
| 15 You should have received a copy of the GNU Library General Public License | 15 You should have received a copy of the GNU Library General Public License |
| 16 along with this library; see the file COPYING.LIB. If not, write to | 16 along with this library; see the file COPYING.LIB. If not, write to |
| 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 18 Boston, MA 02111-1307, USA. | 18 Boston, MA 02111-1307, USA. |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #ifndef V8TestObject_h | 21 #ifndef V8TestObject_h |
| 22 #define V8TestObject_h | 22 #define V8TestObject_h |
| 23 | 23 |
| 24 #include "V8EventTarget.h" |
| 24 #include "bindings/bindings/tests/idls/TestObj.h" | 25 #include "bindings/bindings/tests/idls/TestObj.h" |
| 25 #include "bindings/v8/V8Binding.h" | 26 #include "bindings/v8/V8Binding.h" |
| 26 #include "bindings/v8/V8DOMWrapper.h" | 27 #include "bindings/v8/V8DOMWrapper.h" |
| 27 #include "bindings/v8/WrapperTypeInfo.h" | 28 #include "bindings/v8/WrapperTypeInfo.h" |
| 28 | 29 |
| 29 namespace WebCore { | 30 namespace WebCore { |
| 30 | 31 |
| 31 class V8TestObject { | 32 class V8TestObject { |
| 32 public: | 33 public: |
| 33 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp
e); | 34 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp
e); |
| 34 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); | 35 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); |
| 35 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor
ldType); | 36 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor
ldType); |
| 36 static TestObj* toNative(v8::Handle<v8::Object> object) | 37 static TestObj* toNative(v8::Handle<v8::Object> object) |
| 37 { | 38 { |
| 38 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); | 39 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); |
| 39 } | 40 } |
| 40 static void derefObject(void*); | 41 static void derefObject(void*); |
| 41 static WrapperTypeInfo info; | 42 static WrapperTypeInfo info; |
| 43 static EventTarget* toEventTarget(v8::Handle<v8::Object>); |
| 42 static void customMethodMethodCustom(const v8::FunctionCallbackInfo<v8::Valu
e>&); | 44 static void customMethodMethodCustom(const v8::FunctionCallbackInfo<v8::Valu
e>&); |
| 43 static void customMethodWithArgsMethodCustom(const v8::FunctionCallbackInfo<
v8::Value>&); | 45 static void customMethodWithArgsMethodCustom(const v8::FunctionCallbackInfo<
v8::Value>&); |
| 44 static void classMethod2MethodCustom(const v8::FunctionCallbackInfo<v8::Valu
e>&); | 46 static void classMethod2MethodCustom(const v8::FunctionCallbackInfo<v8::Valu
e>&); |
| 45 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 47 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| 46 static void customAttrAttrGetterCustom(v8::Local<v8::String> name, const v8:
:PropertyCallbackInfo<v8::Value>&); | 48 static void customAttrAttrGetterCustom(v8::Local<v8::String> name, const v8:
:PropertyCallbackInfo<v8::Value>&); |
| 47 static void customAttrAttrSetterCustom(v8::Local<v8::String> name, v8::Local
<v8::Value>, const v8::PropertyCallbackInfo<void>&); | 49 static void customAttrAttrSetterCustom(v8::Local<v8::String> name, v8::Local
<v8::Value>, const v8::PropertyCallbackInfo<void>&); |
| 48 static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCoun
t + 0; | 50 static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCoun
t + 0; |
| 49 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 1
; | 51 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 1
; |
| 50 static inline void* toInternalPointer(TestObj* impl) | 52 static inline void* toInternalPointer(TestObj* impl) |
| 51 { | 53 { |
| 52 return impl; | 54 return V8EventTarget::toInternalPointer(impl); |
| 53 } | 55 } |
| 54 | 56 |
| 55 static inline TestObj* fromInternalPointer(void* object) | 57 static inline TestObj* fromInternalPointer(void* object) |
| 56 { | 58 { |
| 57 return static_cast<TestObj*>(object); | 59 return static_cast<TestObj*>(V8EventTarget::fromInternalPointer(object))
; |
| 58 } | 60 } |
| 59 static void installPerContextProperties(v8::Handle<v8::Object>, TestObj*, v8
::Isolate*); | 61 static void installPerContextProperties(v8::Handle<v8::Object>, TestObj*, v8
::Isolate*); |
| 60 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8:
:Isolate*); | 62 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8:
:Isolate*); |
| 61 private: | 63 private: |
| 62 friend v8::Handle<v8::Object> wrap(TestObj*, v8::Handle<v8::Object> creation
Context, v8::Isolate*); | 64 friend v8::Handle<v8::Object> wrap(TestObj*, v8::Handle<v8::Object> creation
Context, v8::Isolate*); |
| 63 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObj>, v8::Handle<
v8::Object> creationContext, v8::Isolate*); | 65 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObj>, v8::Handle<
v8::Object> creationContext, v8::Isolate*); |
| 64 }; | 66 }; |
| 65 | 67 |
| 66 template<> | 68 template<> |
| 67 class WrapperTypeTraits<TestObj > { | 69 class WrapperTypeTraits<TestObj > { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 } | 124 } |
| 123 | 125 |
| 124 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestObj > impl, v8::Handle<v8::Obj
ect> creationContext, v8::Isolate* isolate) | 126 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestObj > impl, v8::Handle<v8::Obj
ect> creationContext, v8::Isolate* isolate) |
| 125 { | 127 { |
| 126 return toV8(impl.get(), creationContext, isolate); | 128 return toV8(impl.get(), creationContext, isolate); |
| 127 } | 129 } |
| 128 | 130 |
| 129 } | 131 } |
| 130 | 132 |
| 131 #endif // V8TestObject_h | 133 #endif // V8TestObject_h |
| OLD | NEW |