#ifndef JSTestInterface_h
#define JSTestInterface_h
#include "JSDOMBinding.h"
#include <runtime/JSGlobalObject.h>
#include <runtime/ObjectPrototype.h>
namespace WebCore {
class TestInterface;
class JSTestInterface : public DOMObjectWithGlobalPointer {
typedef DOMObjectWithGlobalPointer Base;
public:
JSTestInterface(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<TestInterface>);
virtual ~JSTestInterface();
static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
static const JSC::ClassInfo s_info;
static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
{
return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
}
static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
TestInterface* impl() const { return m_impl.get(); }
private:
RefPtr<TestInterface> m_impl;
protected:
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
};
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestInterface*);
TestInterface* toTestInterface(JSC::JSValue);
class JSTestInterfacePrototype : public JSC::JSObject {
typedef JSC::JSObject Base;
public:
static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
static const JSC::ClassInfo s_info;
static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
{
return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
}
JSTestInterfacePrototype(NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { }
protected:
static const unsigned StructureFlags = Base::StructureFlags;
};
JSC::JSValue jsTestInterfaceConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
}
#endif