WebBackForwardListProxy.h [plain text]
#ifndef WebBackForwardListProxy_h
#define WebBackForwardListProxy_h
#include <WebCore/BackForwardClient.h>
#include <wtf/HashSet.h>
#include <wtf/PassRefPtr.h>
namespace WebKit {
class WebPage;
class WebBackForwardListProxy : public WebCore::BackForwardClient {
public:
static Ref<WebBackForwardListProxy> create(WebPage* page) { return adoptRef(*new WebBackForwardListProxy(page)); }
static WebCore::HistoryItem* itemForID(uint64_t);
static uint64_t idForItem(WebCore::HistoryItem*);
static void removeItem(uint64_t itemID);
static void addItemFromUIProcess(uint64_t itemID, PassRefPtr<WebCore::HistoryItem>, uint64_t pageID);
static void setHighestItemIDFromUIProcess(uint64_t itemID);
void clear();
private:
WebBackForwardListProxy(WebPage*);
virtual void addItem(Ref<WebCore::HistoryItem>&&) override;
virtual void goToItem(WebCore::HistoryItem*) override;
virtual WebCore::HistoryItem* itemAtIndex(int) override;
virtual int backListCount() override;
virtual int forwardListCount() override;
virtual bool isActive();
virtual void close() override;
#if PLATFORM(IOS)
virtual unsigned current() override;
virtual void setCurrent(unsigned newCurrent) override;
virtual bool clearAllPageCaches() override;
#endif
WebPage* m_page;
HashSet<uint64_t> m_associatedItemIDs;
};
}
#endif // WebBackForwardListProxy_h