diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebKit2/UIProcess/WebBackForwardList.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebKit2/UIProcess/WebBackForwardList.h')
-rw-r--r-- | Source/WebKit2/UIProcess/WebBackForwardList.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Source/WebKit2/UIProcess/WebBackForwardList.h b/Source/WebKit2/UIProcess/WebBackForwardList.h index bf13d3b59..178f07e87 100644 --- a/Source/WebKit2/UIProcess/WebBackForwardList.h +++ b/Source/WebKit2/UIProcess/WebBackForwardList.h @@ -29,7 +29,7 @@ #include "APIObject.h" #include "WebBackForwardListItem.h" #include "WebPageProxy.h" -#include <wtf/PassRef.h> +#include <wtf/Ref.h> #include <wtf/RefPtr.h> #include <wtf/Vector.h> #if USE(CF) @@ -38,15 +38,11 @@ namespace WebKit { -/* - * Current - * |---------*--------------| Entries - * Back Forward - */ +struct BackForwardListState; class WebBackForwardList : public API::ObjectImpl<API::Object::Type::BackForwardList> { public: - static PassRef<WebBackForwardList> create(WebPageProxy& page) + static Ref<WebBackForwardList> create(WebPageProxy& page) { return adoptRef(*new WebBackForwardList(page)); } @@ -56,32 +52,36 @@ public: void addItem(WebBackForwardListItem*); void goToItem(WebBackForwardListItem*); + void removeAllItems(); void clear(); WebBackForwardListItem* currentItem() const; WebBackForwardListItem* backItem() const; WebBackForwardListItem* forwardItem() const; WebBackForwardListItem* itemAtIndex(int) const; - + const BackForwardListItemVector& entries() const { return m_entries; } uint32_t currentIndex() const { return m_currentIndex; } int backListCount() const; int forwardListCount() const; - PassRefPtr<API::Array> backListAsAPIArrayWithLimit(unsigned limit) const; - PassRefPtr<API::Array> forwardListAsAPIArrayWithLimit(unsigned limit) const; + Ref<API::Array> backList() const; + Ref<API::Array> forwardList() const; -#if USE(CF) - CFDictionaryRef createCFDictionaryRepresentation(WebPageProxy::WebPageProxySessionStateFilterCallback, void* context) const; - bool restoreFromCFDictionaryRepresentation(CFDictionaryRef); - bool restoreFromV0CFDictionaryRepresentation(CFDictionaryRef); - bool restoreFromV1CFDictionaryRepresentation(CFDictionaryRef); -#endif + Ref<API::Array> backListAsAPIArrayWithLimit(unsigned limit) const; + Ref<API::Array> forwardListAsAPIArrayWithLimit(unsigned limit) const; + + BackForwardListState backForwardListState(const std::function<bool (WebBackForwardListItem&)>&) const; + void restoreFromState(BackForwardListState); + + Vector<BackForwardListItemState> itemStates() const; private: explicit WebBackForwardList(WebPageProxy&); + void didRemoveItem(WebBackForwardListItem&); + WebPageProxy* m_page; BackForwardListItemVector m_entries; |