1/* 2 This file is part of the WebKit open source project. 3 This file has been generated by generate-bindings.pl. DO NOT MODIFY! 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Library General Public 7 License as published by the Free Software Foundation; either 8 version 2 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Library General Public License for more details. 14 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 17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 Boston, MA 02110-1301, USA. 19*/ 20 21#ifndef JSTestCustomNamedGetter_h 22#define JSTestCustomNamedGetter_h 23 24#include "JSDOMBinding.h" 25#include "TestCustomNamedGetter.h" 26#include <runtime/JSGlobalObject.h> 27#include <runtime/JSObject.h> 28#include <runtime/ObjectPrototype.h> 29 30namespace WebCore { 31 32class JSTestCustomNamedGetter : public JSDOMWrapper { 33public: 34 typedef JSDOMWrapper Base; 35 static JSTestCustomNamedGetter* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestCustomNamedGetter> impl) 36 { 37 JSTestCustomNamedGetter* ptr = new (NotNull, JSC::allocateCell<JSTestCustomNamedGetter>(globalObject->vm().heap)) JSTestCustomNamedGetter(structure, globalObject, impl); 38 ptr->finishCreation(globalObject->vm()); 39 return ptr; 40 } 41 42 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); 43 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); 44 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&); 45 static bool getOwnPropertySlotByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&); 46 static void destroy(JSC::JSCell*); 47 ~JSTestCustomNamedGetter(); 48 static const JSC::ClassInfo s_info; 49 50 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) 51 { 52 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info); 53 } 54 55 static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); 56 TestCustomNamedGetter* impl() const { return m_impl; } 57 void releaseImpl() { m_impl->deref(); m_impl = 0; } 58 59 void releaseImplIfNotNull() 60 { 61 if (m_impl) { 62 m_impl->deref(); 63 m_impl = 0; 64 } 65 } 66 67private: 68 TestCustomNamedGetter* m_impl; 69protected: 70 JSTestCustomNamedGetter(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<TestCustomNamedGetter>); 71 void finishCreation(JSC::VM&); 72 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::HasImpureGetOwnPropertySlot | Base::StructureFlags; 73private: 74 static bool canGetItemsForName(JSC::ExecState*, TestCustomNamedGetter*, JSC::PropertyName); 75 static JSC::JSValue nameGetter(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 76}; 77 78class JSTestCustomNamedGetterOwner : public JSC::WeakHandleOwner { 79public: 80 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&); 81 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context); 82}; 83 84inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, TestCustomNamedGetter*) 85{ 86 DEFINE_STATIC_LOCAL(JSTestCustomNamedGetterOwner, jsTestCustomNamedGetterOwner, ()); 87 return &jsTestCustomNamedGetterOwner; 88} 89 90inline void* wrapperContext(DOMWrapperWorld* world, TestCustomNamedGetter*) 91{ 92 return world; 93} 94 95JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCustomNamedGetter*); 96TestCustomNamedGetter* toTestCustomNamedGetter(JSC::JSValue); 97 98class JSTestCustomNamedGetterPrototype : public JSC::JSNonFinalObject { 99public: 100 typedef JSC::JSNonFinalObject Base; 101 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); 102 static JSTestCustomNamedGetterPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) 103 { 104 JSTestCustomNamedGetterPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestCustomNamedGetterPrototype>(vm.heap)) JSTestCustomNamedGetterPrototype(vm, globalObject, structure); 105 ptr->finishCreation(vm); 106 return ptr; 107 } 108 109 static const JSC::ClassInfo s_info; 110 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); 111 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&); 112 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) 113 { 114 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info); 115 } 116 117private: 118 JSTestCustomNamedGetterPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { } 119protected: 120 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 121}; 122 123class JSTestCustomNamedGetterConstructor : public DOMConstructorObject { 124private: 125 JSTestCustomNamedGetterConstructor(JSC::Structure*, JSDOMGlobalObject*); 126 void finishCreation(JSC::ExecState*, JSDOMGlobalObject*); 127 128public: 129 typedef DOMConstructorObject Base; 130 static JSTestCustomNamedGetterConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject) 131 { 132 JSTestCustomNamedGetterConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestCustomNamedGetterConstructor>(*exec->heap())) JSTestCustomNamedGetterConstructor(structure, globalObject); 133 ptr->finishCreation(exec, globalObject); 134 return ptr; 135 } 136 137 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); 138 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&); 139 static const JSC::ClassInfo s_info; 140 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) 141 { 142 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info); 143 } 144protected: 145 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; 146}; 147 148// Functions 149 150JSC::EncodedJSValue JSC_HOST_CALL jsTestCustomNamedGetterPrototypeFunctionAnotherFunction(JSC::ExecState*); 151// Attributes 152 153JSC::JSValue jsTestCustomNamedGetterConstructor(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 154 155} // namespace WebCore 156 157#endif 158