| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this | |
| 2 // source code is governed by a BSD-style license that can be found in the | |
| 3 // LICENSE file. | |
| 4 | |
| 5 #ifndef WEBKIT_GLUE_BACK_FORWARD_LIST_CLIENT_IMPL_H_ | |
| 6 #define WEBKIT_GLUE_BACK_FORWARD_LIST_CLIENT_IMPL_H_ | |
| 7 | |
| 8 #include "BackForwardList.h" | |
| 9 | |
| 10 class WebViewImpl; | |
| 11 | |
| 12 namespace webkit_glue { | |
| 13 | |
| 14 extern const char kBackForwardNavigationScheme[]; | |
| 15 | |
| 16 class BackForwardListClientImpl : public WebCore::BackForwardListClient { | |
| 17 public: | |
| 18 BackForwardListClientImpl(WebViewImpl* webview); | |
| 19 ~BackForwardListClientImpl(); | |
| 20 | |
| 21 void SetCurrentHistoryItem(WebCore::HistoryItem* item); | |
| 22 WebCore::HistoryItem* GetPreviousHistoryItem() const; | |
| 23 | |
| 24 private: | |
| 25 // WebCore::BackForwardListClient methods: | |
| 26 virtual void addItem(PassRefPtr<WebCore::HistoryItem> item); | |
| 27 virtual void goToItem(WebCore::HistoryItem* item); | |
| 28 virtual WebCore::HistoryItem* currentItem(); | |
| 29 virtual WebCore::HistoryItem* itemAtIndex(int index); | |
| 30 virtual int backListCount(); | |
| 31 virtual int forwardListCount(); | |
| 32 virtual void close(); | |
| 33 | |
| 34 WebViewImpl* webview_; | |
| 35 | |
| 36 RefPtr<WebCore::HistoryItem> previous_item_; | |
| 37 RefPtr<WebCore::HistoryItem> current_item_; | |
| 38 | |
| 39 // The last history item that was accessed via itemAtIndex(). We keep track | |
| 40 // of this until goToItem() is called, so we can track the navigation. | |
| 41 RefPtr<WebCore::HistoryItem> pending_history_item_; | |
| 42 }; | |
| 43 | |
| 44 } // namespace webkit_glue | |
| 45 | |
| 46 #endif // WEBKIT_GLUE_BACK_FORWARD_LIST_CLIENT_IMPL_H_ | |
| OLD | NEW |