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

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

Issue 23710021: Merge 157196 "Don't wait to notify client of spoof attempt if a ..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1599/
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // or guarantee they won't in any way access the Frame after stopAllLoaders returns. 108 // or guarantee they won't in any way access the Frame after stopAllLoaders returns.
109 void stopAllLoaders(ClearProvisionalItemPolicy = ShouldClearProvisionalItem) ; 109 void stopAllLoaders(ClearProvisionalItemPolicy = ShouldClearProvisionalItem) ;
110 void stopForUserCancel(bool deferCheckLoadComplete = false); 110 void stopForUserCancel(bool deferCheckLoadComplete = false);
111 void stop(); 111 void stop();
112 void stopLoading(UnloadEventPolicy); 112 void stopLoading(UnloadEventPolicy);
113 bool closeURL(); 113 bool closeURL();
114 void cancelAndClear(); 114 void cancelAndClear();
115 // FIXME: clear() is trying to do too many things. We should break it down i nto smaller functions (ideally with fewer raw Boolean parameters). 115 // FIXME: clear() is trying to do too many things. We should break it down i nto smaller functions (ideally with fewer raw Boolean parameters).
116 void clear(bool clearWindowProperties = true, bool clearScriptObjects = true , bool clearFrameView = true); 116 void clear(bool clearWindowProperties = true, bool clearScriptObjects = true , bool clearFrameView = true);
117 117
118 // Sets a timer to notify the client that the initial empty document has
119 // been accessed, and thus it is no longer safe to show a provisional URL
120 // above the document without risking a URL spoof.
118 void didAccessInitialDocument(); 121 void didAccessInitialDocument();
119 void didAccessInitialDocumentTimerFired(Timer<FrameLoader>*); 122
123 // If the initial empty document is showing and has been accessed, this
124 // cancels the timer and immediately notifies the client in cases that
125 // waiting to notify would allow a URL spoof.
126 void notifyIfInitialDocumentAccessed();
120 127
121 bool isLoading() const; 128 bool isLoading() const;
122 129
123 int numPendingOrLoadingRequests(bool recurse) const; 130 int numPendingOrLoadingRequests(bool recurse) const;
124 String referrer() const; 131 String referrer() const;
125 String outgoingReferrer() const; 132 String outgoingReferrer() const;
126 String outgoingOrigin() const; 133 String outgoingOrigin() const;
127 134
128 DocumentLoader* activeDocumentLoader() const; 135 DocumentLoader* activeDocumentLoader() const;
129 DocumentLoader* documentLoader() const { return m_documentLoader.get(); } 136 DocumentLoader* documentLoader() const { return m_documentLoader.get(); }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 enum UpdateBackForwardListPolicy { 245 enum UpdateBackForwardListPolicy {
239 UpdateBackForwardList, 246 UpdateBackForwardList,
240 DoNotUpdateBackForwardList 247 DoNotUpdateBackForwardList
241 }; 248 };
242 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSour ce, PassRefPtr<SerializedScriptValue>, const String& title, UpdateBackForwardLis tPolicy); 249 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSour ce, PassRefPtr<SerializedScriptValue>, const String& title, UpdateBackForwardLis tPolicy);
243 250
244 private: 251 private:
245 bool allChildrenAreComplete() const; // immediate children, not all descenda nts 252 bool allChildrenAreComplete() const; // immediate children, not all descenda nts
246 253
247 void checkTimerFired(Timer<FrameLoader>*); 254 void checkTimerFired(Timer<FrameLoader>*);
255 void didAccessInitialDocumentTimerFired(Timer<FrameLoader>*);
248 256
249 void loadSameDocumentItem(HistoryItem*); 257 void loadSameDocumentItem(HistoryItem*);
250 void loadDifferentDocumentItem(HistoryItem*); 258 void loadDifferentDocumentItem(HistoryItem*);
251 void insertDummyHistoryItem(); 259 void insertDummyHistoryItem();
252 260
253 bool prepareRequestForThisFrame(FrameLoadRequest&); 261 bool prepareRequestForThisFrame(FrameLoadRequest&);
254 void setReferrerForFrameRequest(ResourceRequest&, ShouldSendReferrer); 262 void setReferrerForFrameRequest(ResourceRequest&, ShouldSendReferrer);
255 FrameLoadType determineFrameLoadType(const FrameLoadRequest&); 263 FrameLoadType determineFrameLoadType(const FrameLoadRequest&);
256 264
257 SubstituteData defaultSubstituteDataForURL(const KURL&); 265 SubstituteData defaultSubstituteDataForURL(const KURL&);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 SandboxFlags m_forcedSandboxFlags; 351 SandboxFlags m_forcedSandboxFlags;
344 352
345 bool m_hasAllowedNavigationViaBeforeUnloadConfirmationPanel; 353 bool m_hasAllowedNavigationViaBeforeUnloadConfirmationPanel;
346 354
347 RefPtr<HistoryItem> m_requestedHistoryItem; 355 RefPtr<HistoryItem> m_requestedHistoryItem;
348 }; 356 };
349 357
350 } // namespace WebCore 358 } // namespace WebCore
351 359
352 #endif // FrameLoader_h 360 #endif // FrameLoader_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698