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

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

Issue 927213004: Accept options in history APIs to allow scroll restoration to be disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: minor Created 5 years, 7 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, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2011 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 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
5 * Copyright (C) 2011 Google Inc. All rights reserved. 5 * Copyright (C) 2011 Google Inc. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 bool shouldInterruptLoadForXFrameOptions(const String&, const KURL&, unsigne d long requestIdentifier); 162 bool shouldInterruptLoadForXFrameOptions(const String&, const KURL&, unsigne d long requestIdentifier);
163 163
164 bool allAncestorsAreComplete() const; // including this 164 bool allAncestorsAreComplete() const; // including this
165 165
166 bool shouldClose(); 166 bool shouldClose();
167 void dispatchUnloadEvent(); 167 void dispatchUnloadEvent();
168 168
169 bool allowPlugins(ReasonForCallingAllowPlugins); 169 bool allowPlugins(ReasonForCallingAllowPlugins);
170 170
171 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSour ce, PassRefPtr<SerializedScriptValue>, FrameLoadType); 171 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSour ce, PassRefPtr<SerializedScriptValue>, bool shouldRestoreScroll, FrameLoadType);
Nate Chapin 2015/05/07 20:26:59 This would ideally be an enum.
172 172
173 HistoryItem* currentItem() const { return m_currentItem.get(); } 173 HistoryItem* currentItem() const { return m_currentItem.get(); }
174 void saveScrollState(); 174 void saveScrollState();
175 void clearScrollPositionAndViewState(); 175 void clearScrollPositionAndViewState();
176 176
177 void restoreScrollPositionAndViewState(); 177 void restoreScrollPositionAndViewState();
178 178
179 DECLARE_TRACE(); 179 DECLARE_TRACE();
180 180
181 private: 181 private:
182 void checkTimerFired(Timer<FrameLoader>*); 182 void checkTimerFired(Timer<FrameLoader>*);
183 void didAccessInitialDocumentTimerFired(Timer<FrameLoader>*); 183 void didAccessInitialDocumentTimerFired(Timer<FrameLoader>*);
184 184
185 bool prepareRequestForThisFrame(FrameLoadRequest&); 185 bool prepareRequestForThisFrame(FrameLoadRequest&);
186 static void setReferrerForFrameRequest(ResourceRequest&, ShouldSendReferrer, Document*); 186 static void setReferrerForFrameRequest(ResourceRequest&, ShouldSendReferrer, Document*);
187 FrameLoadType determineFrameLoadType(const FrameLoadRequest&); 187 FrameLoadType determineFrameLoadType(const FrameLoadRequest&);
188 bool isScriptTriggeredFormSubmissionInChildFrame(const FrameLoadRequest&) co nst; 188 bool isScriptTriggeredFormSubmissionInChildFrame(const FrameLoadRequest&) co nst;
189 189
190 SubstituteData defaultSubstituteDataForURL(const KURL&); 190 SubstituteData defaultSubstituteDataForURL(const KURL&);
191 191
192 bool shouldPerformFragmentNavigation(bool isFormSubmission, const String& ht tpMethod, FrameLoadType, const KURL&); 192 bool shouldPerformFragmentNavigation(bool isFormSubmission, const String& ht tpMethod, FrameLoadType, const KURL&);
193 void scrollToFragmentWithParentBoundary(const KURL&); 193 void scrollToFragmentWithParentBoundary(const KURL&);
194 194
195 void startLoad(FrameLoadRequest&, FrameLoadType, NavigationPolicy); 195 void startLoad(FrameLoadRequest&, FrameLoadType, NavigationPolicy);
196 196
197 bool validateTransitionNavigationMode(); 197 bool validateTransitionNavigationMode();
198 bool dispatchNavigationTransitionData(); 198 bool dispatchNavigationTransitionData();
199 199
200 void setHistoryItemStateForCommit(HistoryCommitType, bool isPushOrReplaceSta te = false, PassRefPtr<SerializedScriptValue> = nullptr); 200 void setHistoryItemStateForCommit(HistoryCommitType, bool isPushOrReplaceSta te = false, bool shouldRestoreScroll = true, PassRefPtr<SerializedScriptValue> = nullptr);
201 201
202 void loadInSameDocument(const KURL&, PassRefPtr<SerializedScriptValue> state Object, FrameLoadType, ClientRedirectPolicy); 202 void loadInSameDocument(const KURL&, PassRefPtr<SerializedScriptValue> state Object, FrameLoadType, ClientRedirectPolicy);
203 203
204 void scheduleCheckCompleted(); 204 void scheduleCheckCompleted();
205 205
206 RawPtrWillBeMember<LocalFrame> m_frame; 206 RawPtrWillBeMember<LocalFrame> m_frame;
207 207
208 // FIXME: These should be OwnPtr<T> to reduce build times and simplify 208 // FIXME: These should be OwnPtr<T> to reduce build times and simplify
209 // header dependencies unless performance testing proves otherwise. 209 // header dependencies unless performance testing proves otherwise.
210 // Some of these could be lazily created for memory savings on devices. 210 // Some of these could be lazily created for memory savings on devices.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 bool m_didAccessInitialDocument; 258 bool m_didAccessInitialDocument;
259 Timer<FrameLoader> m_didAccessInitialDocumentTimer; 259 Timer<FrameLoader> m_didAccessInitialDocumentTimer;
260 260
261 SandboxFlags m_forcedSandboxFlags; 261 SandboxFlags m_forcedSandboxFlags;
262 }; 262 };
263 263
264 } // namespace blink 264 } // namespace blink
265 265
266 #endif // FrameLoader_h 266 #endif // FrameLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698