#ifndef PAGE_H
#define PAGE_H
#include "Chrome.h"
#include "PlatformString.h"
#include "SelectionController.h"
#include <wtf/HashSet.h>
#include <wtf/OwnPtr.h>
#include "Document.h"
#if __APPLE__
#ifdef __OBJC__
@class WebCorePageBridge;
#else
class WebCorePageBridge;
#endif
#endif
namespace WebCore {
class Chrome;
class ChromeClient;
class Frame;
class FrameNamespace;
class FloatRect;
class Settings;
class Widget;
class Page : Noncopyable {
public:
~Page();
void setMainFrame(PassRefPtr<Frame>);
Frame* mainFrame() const { return m_mainFrame.get(); }
FloatRect windowRect() const;
void setWindowRect(const FloatRect&);
void setGroupName(const String&);
String groupName() const { return m_groupName; }
const HashSet<Page*>* frameNamespace() const;
static const HashSet<Page*>* frameNamespace(const String&);
void incrementFrameCount() { ++m_frameCount; }
void decrementFrameCount() { --m_frameCount; }
int frameCount() const { return m_frameCount; }
Chrome* chrome() const { return m_chrome.get(); }
Widget* widget() const;
static void setNeedsReapplyStyles();
static void setNeedsReapplyStylesForSettingsChange(Settings*);
void setDragCaret(const SelectionController&);
SelectionController& dragCaret() const;
#if PLATFORM(MAC)
Page(WebCorePageBridge*, ChromeClient*);
WebCorePageBridge* bridge() const { return m_bridge; }
#endif
#if PLATFORM(WIN_OS)
Page();
#endif
private:
OwnPtr<Chrome> m_chrome;
void init();
RefPtr<Frame> m_mainFrame;
int m_frameCount;
mutable Widget* m_widget;
String m_groupName;
mutable SelectionController m_dragCaret;
#if __APPLE__
WebCorePageBridge* m_bridge;
#endif
};
}
#endif // PAGE_H