OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 void restoreScrollPositionAndViewState(); | 53 void restoreScrollPositionAndViewState(); |
54 | 54 |
55 void updateBackForwardListForFragmentScroll(); | 55 void updateBackForwardListForFragmentScroll(); |
56 | 56 |
57 void saveDocumentState(); | 57 void saveDocumentState(); |
58 void saveDocumentAndScrollState(); | 58 void saveDocumentAndScrollState(); |
59 void restoreDocumentState(); | 59 void restoreDocumentState(); |
60 | 60 |
61 void invalidateCurrentItemCachedPage(); | 61 void invalidateCurrentItemCachedPage(); |
62 | 62 |
63 void goToItem(HistoryItem*, FrameLoadType); | |
64 | |
65 void updateForBackForwardNavigation(); | 63 void updateForBackForwardNavigation(); |
66 void updateForReload(); | 64 void updateForReload(); |
67 void updateForStandardLoad(HistoryUpdateType updateType = UpdateAll); | 65 void updateForStandardLoad(HistoryUpdateType updateType = UpdateAll); |
68 void updateForRedirectWithLockedBackForwardList(); | 66 void updateForRedirectWithLockedBackForwardList(); |
69 void updateForClientRedirect(); | 67 void updateForClientRedirect(); |
70 void updateForCommit(); | 68 void updateForCommit(); |
71 void updateForSameDocumentNavigation(); | 69 void updateForSameDocumentNavigation(); |
72 void updateForFrameLoadCompleted(); | 70 void updateForFrameLoadCompleted(); |
73 | 71 |
74 HistoryItem* currentItem() const { return m_currentItem.get(); } | 72 HistoryItem* currentItem() const { return m_currentItem.get(); } |
75 void setCurrentItem(HistoryItem*); | 73 void setCurrentItem(HistoryItem*); |
76 void setCurrentItemTitle(const String&); | 74 void setCurrentItemTitle(const String&); |
77 bool currentItemShouldBeReplaced() const; | 75 bool currentItemShouldBeReplaced() const; |
78 | 76 |
79 HistoryItem* previousItem() const { return m_previousItem.get(); } | 77 HistoryItem* previousItem() const { return m_previousItem.get(); } |
80 | 78 |
81 HistoryItem* provisionalItem() const { return m_provisionalItem.get(); } | 79 HistoryItem* provisionalItem() const { return m_provisionalItem.get(); } |
82 void setProvisionalItem(HistoryItem*); | 80 void setProvisionalItem(HistoryItem*); |
83 | 81 |
84 void pushState(PassRefPtr<SerializedScriptValue>, const String& title, const
String& url); | 82 void pushState(PassRefPtr<SerializedScriptValue>, const String& title, const
String& url); |
85 void replaceState(PassRefPtr<SerializedScriptValue>, const String& title, co
nst String& url); | 83 void replaceState(PassRefPtr<SerializedScriptValue>, const String& title, co
nst String& url); |
86 | 84 |
87 private: | 85 private: |
| 86 friend class Page; |
| 87 bool shouldStopLoadingForHistoryItem(HistoryItem*) const; |
| 88 void goToItem(HistoryItem*, FrameLoadType); |
| 89 |
88 void initializeItem(HistoryItem*); | 90 void initializeItem(HistoryItem*); |
89 PassRefPtr<HistoryItem> createItem(); | 91 PassRefPtr<HistoryItem> createItem(); |
90 PassRefPtr<HistoryItem> createItemTree(Frame* targetFrame, bool clipAtTarget
); | 92 PassRefPtr<HistoryItem> createItemTree(Frame* targetFrame, bool clipAtTarget
); |
91 | 93 |
92 void recursiveSetProvisionalItem(HistoryItem*, HistoryItem*, FrameLoadType); | 94 void recursiveSetProvisionalItem(HistoryItem*, HistoryItem*, FrameLoadType); |
93 void recursiveGoToItem(HistoryItem*, HistoryItem*, FrameLoadType); | 95 void recursiveGoToItem(HistoryItem*, HistoryItem*, FrameLoadType); |
94 bool isReplaceLoadTypeWithProvisionalItem(FrameLoadType); | 96 bool isReplaceLoadTypeWithProvisionalItem(FrameLoadType); |
95 void recursiveUpdateForCommit(); | 97 void recursiveUpdateForCommit(); |
96 void recursiveUpdateForSameDocumentNavigation(); | 98 void recursiveUpdateForSameDocumentNavigation(); |
97 bool itemsAreClones(HistoryItem*, HistoryItem*) const; | 99 bool itemsAreClones(HistoryItem*, HistoryItem*) const; |
98 bool currentFramesMatchItem(HistoryItem*) const; | 100 bool currentFramesMatchItem(HistoryItem*) const; |
99 void updateBackForwardListClippedAtTarget(bool doClip); | 101 void updateBackForwardListClippedAtTarget(bool doClip); |
100 void updateCurrentItem(); | 102 void updateCurrentItem(); |
101 | 103 |
102 Frame* m_frame; | 104 Frame* m_frame; |
103 | 105 |
104 RefPtr<HistoryItem> m_currentItem; | 106 RefPtr<HistoryItem> m_currentItem; |
105 RefPtr<HistoryItem> m_previousItem; | 107 RefPtr<HistoryItem> m_previousItem; |
106 RefPtr<HistoryItem> m_provisionalItem; | 108 RefPtr<HistoryItem> m_provisionalItem; |
107 | 109 |
108 bool m_frameLoadComplete; | 110 bool m_frameLoadComplete; |
109 }; | 111 }; |
110 | 112 |
111 } // namespace WebCore | 113 } // namespace WebCore |
112 | 114 |
113 #endif // HistoryController_h | 115 #endif // HistoryController_h |
OLD | NEW |