OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 15 matching lines...) Expand all Loading... |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef BackForwardListClientImpl_h | 31 #ifndef BackForwardListClientImpl_h |
32 #define BackForwardListClientImpl_h | 32 #define BackForwardListClientImpl_h |
33 | 33 |
34 #include "BackForwardList.h" | 34 #include "BackForwardList.h" |
35 | 35 |
| 36 namespace WebKit { |
36 class WebViewImpl; | 37 class WebViewImpl; |
37 | 38 |
38 namespace WebKit { | |
39 | |
40 extern const char backForwardNavigationScheme[]; | 39 extern const char backForwardNavigationScheme[]; |
41 | 40 |
42 class BackForwardListClientImpl : public WebCore::BackForwardListClient { | 41 class BackForwardListClientImpl : public WebCore::BackForwardListClient { |
43 public: | 42 public: |
44 BackForwardListClientImpl(WebViewImpl* webview); | 43 BackForwardListClientImpl(WebViewImpl* webview); |
45 ~BackForwardListClientImpl(); | 44 ~BackForwardListClientImpl(); |
46 | 45 |
47 void SetCurrentHistoryItem(WebCore::HistoryItem* item); | 46 void setCurrentHistoryItem(WebCore::HistoryItem* item); |
48 WebCore::HistoryItem* GetPreviousHistoryItem() const; | 47 WebCore::HistoryItem* previousHistoryItem() const; |
49 | 48 |
50 private: | 49 private: |
51 // WebCore::BackForwardListClient methods: | 50 // WebCore::BackForwardListClient methods: |
52 virtual void addItem(PassRefPtr<WebCore::HistoryItem>); | 51 virtual void addItem(PassRefPtr<WebCore::HistoryItem>); |
53 virtual void goToItem(WebCore::HistoryItem*); | 52 virtual void goToItem(WebCore::HistoryItem*); |
54 virtual WebCore::HistoryItem* currentItem(); | 53 virtual WebCore::HistoryItem* currentItem(); |
55 virtual WebCore::HistoryItem* itemAtIndex(int index); | 54 virtual WebCore::HistoryItem* itemAtIndex(int index); |
56 virtual int backListCount(); | 55 virtual int backListCount(); |
57 virtual int forwardListCount(); | 56 virtual int forwardListCount(); |
58 virtual void close(); | 57 virtual void close(); |
59 | 58 |
60 WebViewImpl* m_webView; | 59 WebViewImpl* m_webView; |
61 | 60 |
62 RefPtr<WebCore::HistoryItem> m_previousItem; | 61 RefPtr<WebCore::HistoryItem> m_previousItem; |
63 RefPtr<WebCore::HistoryItem> m_currentItem; | 62 RefPtr<WebCore::HistoryItem> m_currentItem; |
64 | 63 |
65 // The last history item that was accessed via itemAtIndex(). We keep track | 64 // The last history item that was accessed via itemAtIndex(). We keep track |
66 // of this until goToItem() is called, so we can track the navigation. | 65 // of this until goToItem() is called, so we can track the navigation. |
67 RefPtr<WebCore::HistoryItem> m_pendingHistoryItem; | 66 RefPtr<WebCore::HistoryItem> m_pendingHistoryItem; |
68 }; | 67 }; |
69 | 68 |
70 } // namespace WebKit | 69 } // namespace WebKit |
71 | 70 |
72 #endif | 71 #endif |
OLD | NEW |