#ifndef WebPageGroup_h
#define WebPageGroup_h
#include "APIObject.h"
#include "WebPageGroupData.h"
#include "WebProcessProxy.h"
#include <WebCore/UserStyleSheetTypes.h>
#include <wtf/Forward.h>
#include <wtf/HashSet.h>
#include <wtf/text/WTFString.h>
namespace WebKit {
class WebPreferences;
class WebPageProxy;
class WebUserContentControllerProxy;
class WebPageGroup : public API::ObjectImpl<API::Object::Type::PageGroup> {
public:
WebPageGroup(const String& identifier = String(), bool visibleToInjectedBundle = true, bool visibleToHistoryClient = true);
static Ref<WebPageGroup> create(const String& identifier = String(), bool visibleToInjectedBundle = true, bool visibleToHistoryClient = true);
static Ref<WebPageGroup> createNonNull(const String& identifier = String(), bool visibleToInjectedBundle = true, bool visibleToHistoryClient = true);
static WebPageGroup* get(uint64_t pageGroupID);
virtual ~WebPageGroup();
void addPage(WebPageProxy*);
void removePage(WebPageProxy*);
uint64_t pageGroupID() const { return m_data.pageGroupID; }
const WebPageGroupData& data() const { return m_data; }
void setPreferences(WebPreferences*);
WebPreferences& preferences() const;
void preferencesDidChange();
WebUserContentControllerProxy& userContentController();
private:
WebPageGroupData m_data;
RefPtr<WebPreferences> m_preferences;
RefPtr<WebUserContentControllerProxy> m_userContentController;
HashSet<WebPageProxy*> m_pages;
};
}
#endif // WebPageGroup_h