JSInjectedScriptHost.h [plain text]
#ifndef JSInjectedScriptHost_h
#define JSInjectedScriptHost_h
#if ENABLE(INSPECTOR)
#include "JSDestructibleObject.h"
namespace Inspector {
class InjectedScriptHost;
class JSInjectedScriptHost : public JSC::JSDestructibleObject {
public:
typedef JSC::JSDestructibleObject Base;
DECLARE_INFO;
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
{
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
}
static JSInjectedScriptHost* create(JSC::VM& vm, JSC::Structure* structure, PassRefPtr<InjectedScriptHost> impl)
{
JSInjectedScriptHost* instance = new (NotNull, JSC::allocateCell<JSInjectedScriptHost>(vm.heap)) JSInjectedScriptHost(vm, structure, impl);
instance->finishCreation(vm);
return instance;
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static void destroy(JSC::JSCell*);
InjectedScriptHost& impl() const { return *m_impl; }
void releaseImpl();
JSC::JSValue evaluate(JSC::ExecState*) const;
JSC::JSValue internalConstructorName(JSC::ExecState*);
JSC::JSValue isHTMLAllCollection(JSC::ExecState*);
JSC::JSValue type(JSC::ExecState*);
JSC::JSValue functionDetails(JSC::ExecState*);
JSC::JSValue getInternalProperties(JSC::ExecState*);
protected:
static const unsigned StructureFlags = Base::StructureFlags;
void finishCreation(JSC::VM&);
private:
JSInjectedScriptHost(JSC::VM&, JSC::Structure*, PassRefPtr<InjectedScriptHost>);
~JSInjectedScriptHost();
InjectedScriptHost* m_impl;
};
JSC::JSValue toJS(JSC::ExecState*, JSC::JSGlobalObject*, InjectedScriptHost*);
JSInjectedScriptHost* toJSInjectedScriptHost(JSC::JSValue);
}
#endif // ENABLE(INSPECTOR)
#endif // !defined(JSInjectedScriptHost_h)