Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: Source/core/loader/HistoryController.h

Issue 123133006: Expose a cachePolicy parameter to loadHistoryItem. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 14 matching lines...) Expand all
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 #ifndef HistoryController_h 30 #ifndef HistoryController_h
31 #define HistoryController_h 31 #define HistoryController_h
32 32
33 #include "core/history/HistoryItem.h" 33 #include "core/history/HistoryItem.h"
34 #include "core/loader/FrameLoaderTypes.h" 34 #include "core/loader/FrameLoaderTypes.h"
35 #include "platform/network/ResourceRequest.h"
35 #include "wtf/HashMap.h" 36 #include "wtf/HashMap.h"
36 #include "wtf/Noncopyable.h" 37 #include "wtf/Noncopyable.h"
37 #include "wtf/RefPtr.h" 38 #include "wtf/RefPtr.h"
38 #include "wtf/text/WTFString.h" 39 #include "wtf/text/WTFString.h"
39 40
40 namespace WebCore { 41 namespace WebCore {
41 42
42 class Frame; 43 class Frame;
43 class HistoryEntry; 44 class HistoryEntry;
44 class Page; 45 class Page;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 }; 132 };
132 133
133 class HistoryController { 134 class HistoryController {
134 WTF_MAKE_NONCOPYABLE(HistoryController); 135 WTF_MAKE_NONCOPYABLE(HistoryController);
135 public: 136 public:
136 explicit HistoryController(Page*); 137 explicit HistoryController(Page*);
137 ~HistoryController(); 138 ~HistoryController();
138 139
139 // Should only be called by embedder. To request a back/forward 140 // Should only be called by embedder. To request a back/forward
140 // navigation, call FrameLoaderClient::navigateBackForward(). 141 // navigation, call FrameLoaderClient::navigateBackForward().
141 void goToItem(HistoryItem*); 142 void goToItem(HistoryItem*, ResourceRequestCachePolicy);
142 143
143 void updateBackForwardListForFragmentScroll(Frame*, HistoryItem*); 144 void updateBackForwardListForFragmentScroll(Frame*, HistoryItem*);
144 void updateForCommit(Frame*, HistoryItem*, HistoryCommitType); 145 void updateForCommit(Frame*, HistoryItem*, HistoryCommitType);
145 146
146 PassRefPtr<HistoryItem> currentItemForExport(Frame*); 147 PassRefPtr<HistoryItem> currentItemForExport(Frame*);
147 PassRefPtr<HistoryItem> previousItemForExport(Frame*); 148 PassRefPtr<HistoryItem> previousItemForExport(Frame*);
148 PassRefPtr<HistoryItem> provisionalItemForExport(Frame*); 149 PassRefPtr<HistoryItem> provisionalItemForExport(Frame*);
149 HistoryItem* itemForNewChildFrame(Frame*) const; 150 HistoryItem* itemForNewChildFrame(Frame*) const;
150 151
151 bool inSameDocumentLoad() const { return !m_sameDocumentLoadsInProgress.isEm pty() && m_differentDocumentLoadsInProgress.isEmpty(); } 152 bool inSameDocumentLoad() const { return !m_sameDocumentLoadsInProgress.isEm pty() && m_differentDocumentLoadsInProgress.isEmpty(); }
152 153
153 void setDefersLoading(bool); 154 void setDefersLoading(bool);
154 155
155 private: 156 private:
156 void goToEntry(PassOwnPtr<HistoryEntry>); 157 void goToEntry(PassOwnPtr<HistoryEntry>, ResourceRequestCachePolicy);
157 void recursiveGoToEntry(Frame*); 158 void recursiveGoToEntry(Frame*);
158 159
159 void updateForInitialLoadInChildFrame(Frame*, HistoryItem*); 160 void updateForInitialLoadInChildFrame(Frame*, HistoryItem*);
160 void createNewBackForwardItem(Frame*, HistoryItem*, bool doClip); 161 void createNewBackForwardItem(Frame*, HistoryItem*, bool doClip);
161 162
162 Page* m_page; 163 Page* m_page;
163 164
164 OwnPtr<HistoryEntry> m_currentEntry; 165 OwnPtr<HistoryEntry> m_currentEntry;
165 OwnPtr<HistoryEntry> m_previousEntry; 166 OwnPtr<HistoryEntry> m_previousEntry;
166 OwnPtr<HistoryEntry> m_provisionalEntry; 167 OwnPtr<HistoryEntry> m_provisionalEntry;
167 168
168 typedef HashMap<Frame*, HistoryItem*> HistoryFrameLoadSet; 169 typedef HashMap<Frame*, HistoryItem*> HistoryFrameLoadSet;
169 HistoryFrameLoadSet m_sameDocumentLoadsInProgress; 170 HistoryFrameLoadSet m_sameDocumentLoadsInProgress;
170 HistoryFrameLoadSet m_differentDocumentLoadsInProgress; 171 HistoryFrameLoadSet m_differentDocumentLoadsInProgress;
171 172
172 bool m_defersLoading; 173 bool m_defersLoading;
173 RefPtr<HistoryItem> m_deferredItem; 174 RefPtr<HistoryItem> m_deferredItem;
175 ResourceRequestCachePolicy m_deferredCachePolicy;
174 }; 176 };
175 177
176 } // namespace WebCore 178 } // namespace WebCore
177 179
178 #endif // HistoryController_h 180 #endif // HistoryController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698