OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 28 matching lines...) Expand all Loading... |
39 // FIXME: Why does this class exist? It seems to delegate almost entirely to Pag
e, and perhaps should be part of Page's implementation. | 39 // FIXME: Why does this class exist? It seems to delegate almost entirely to Pag
e, and perhaps should be part of Page's implementation. |
40 class BackForwardController { | 40 class BackForwardController { |
41 WTF_MAKE_NONCOPYABLE(BackForwardController); WTF_MAKE_FAST_ALLOCATED; | 41 WTF_MAKE_NONCOPYABLE(BackForwardController); WTF_MAKE_FAST_ALLOCATED; |
42 public: | 42 public: |
43 ~BackForwardController(); | 43 ~BackForwardController(); |
44 | 44 |
45 static PassOwnPtr<BackForwardController> create(Page*, BackForwardClient*); | 45 static PassOwnPtr<BackForwardController> create(Page*, BackForwardClient*); |
46 | 46 |
47 BackForwardClient* client() const { return m_client; } | 47 BackForwardClient* client() const { return m_client; } |
48 | 48 |
49 bool canGoBackOrForward(int distance) const; | |
50 void goBackOrForward(int distance); | 49 void goBackOrForward(int distance); |
51 | 50 |
52 bool goBack(); | 51 bool goBack(); |
53 bool goForward(); | 52 bool goForward(); |
54 | 53 |
55 void addItem(PassRefPtr<HistoryItem>); | 54 void addItem(PassRefPtr<HistoryItem>); |
56 void setCurrentItem(HistoryItem*); | 55 void setCurrentItem(HistoryItem*); |
57 | 56 |
58 int count() const; | 57 int count() const; |
59 int backCount() const; | 58 int backCount() const; |
(...skipping 12 matching lines...) Expand all Loading... |
72 private: | 71 private: |
73 BackForwardController(Page*, BackForwardClient*); | 72 BackForwardController(Page*, BackForwardClient*); |
74 | 73 |
75 Page* m_page; | 74 Page* m_page; |
76 BackForwardClient* m_client; | 75 BackForwardClient* m_client; |
77 }; | 76 }; |
78 | 77 |
79 } // namespace WebCore | 78 } // namespace WebCore |
80 | 79 |
81 #endif // BackForwardController_h | 80 #endif // BackForwardController_h |
OLD | NEW |