#ifndef JSDOMWindowBase_h
#define JSDOMWindowBase_h
#include "JSDOMBinding.h"
#include "JSDOMGlobalObject.h"
#include <wtf/Forward.h>
namespace WebCore {
class DOMWindow;
class Frame;
class DOMWrapperWorld;
class JSDOMWindow;
class JSDOMWindowShell;
class JSDOMWindowBasePrivate;
class JSDOMWindowBase : public JSDOMGlobalObject {
typedef JSDOMGlobalObject Base;
protected:
JSDOMWindowBase(JSC::VM&, JSC::Structure*, PassRefPtr<DOMWindow>, JSDOMWindowShell*);
void finishCreation(JSC::VM&, JSDOMWindowShell*);
static void destroy(JSCell*);
public:
void updateDocument();
DOMWindow* impl() const { return m_impl.get(); }
ScriptExecutionContext* scriptExecutionContext() const;
void willRemoveFromWindowShell();
static const JSC::ClassInfo s_info;
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSValue prototype)
{
return JSC::Structure::create(vm, 0, prototype, JSC::TypeInfo(JSC::GlobalObjectType, StructureFlags), &s_info);
}
static const JSC::GlobalObjectMethodTable s_globalObjectMethodTable;
static bool supportsProfiling(const JSC::JSGlobalObject*);
static bool supportsRichSourceInfo(const JSC::JSGlobalObject*);
static bool shouldInterruptScript(const JSC::JSGlobalObject*);
static bool javaScriptExperimentsEnabled(const JSC::JSGlobalObject*);
void printErrorMessage(const String&) const;
JSDOMWindowShell* shell() const;
static JSC::VM* commonVM();
private:
RefPtr<DOMWindow> m_impl;
JSDOMWindowShell* m_shell;
};
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, DOMWindow*);
JSC::JSValue toJS(JSC::ExecState*, DOMWindow*);
JSDOMWindow* toJSDOMWindow(Frame*, DOMWrapperWorld*);
JSDOMWindow* toJSDOMWindow(JSC::JSValue);
}
#endif // JSDOMWindowBase_h