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

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

Issue 23620020: Don't wait to notify client of spoof attempt if a modal dialog is created. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use PageGroupLoadDeferrer instead 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
« 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 // FIXME: These are all functions which stop loads. We have too many. 105 // FIXME: These are all functions which stop loads. We have too many.
106 // Warning: stopAllLoaders can and will detach the Frame out from under you. All callers need to either protect the Frame 106 // Warning: stopAllLoaders can and will detach the Frame out from under you. All callers need to either protect the Frame
107 // or guarantee they won't in any way access the Frame after stopAllLoaders returns. 107 // or guarantee they won't in any way access the Frame after stopAllLoaders returns.
108 void stopAllLoaders(ClearProvisionalItemPolicy = ShouldClearProvisionalItem) ; 108 void stopAllLoaders(ClearProvisionalItemPolicy = ShouldClearProvisionalItem) ;
109 void stopLoading(); 109 void stopLoading();
110 bool closeURL(); 110 bool closeURL();
111 // FIXME: clear() is trying to do too many things. We should break it down i nto smaller functions. 111 // FIXME: clear() is trying to do too many things. We should break it down i nto smaller functions.
112 void clear(ClearOptions); 112 void clear(ClearOptions);
113 113
114 // Sets a timer to notify the client that the initial empty document has
115 // been accessed, and thus it is no longer safe to show a provisional URL
116 // above the document without risking a URL spoof.
114 void didAccessInitialDocument(); 117 void didAccessInitialDocument();
115 void didAccessInitialDocumentTimerFired(Timer<FrameLoader>*); 118
119 // If the initial empty document is showing and has been accessed, this
120 // cancels the timer and immediately notifies the client in cases that
121 // waiting to notify would allow a URL spoof.
122 void notifyIfInitialDocumentAccessed();
116 123
117 bool isLoading() const; 124 bool isLoading() const;
118 125
119 int numPendingOrLoadingRequests(bool recurse) const; 126 int numPendingOrLoadingRequests(bool recurse) const;
120 String outgoingReferrer() const; 127 String outgoingReferrer() const;
121 String outgoingOrigin() const; 128 String outgoingOrigin() const;
122 129
123 DocumentLoader* activeDocumentLoader() const; 130 DocumentLoader* activeDocumentLoader() const;
124 DocumentLoader* documentLoader() const { return m_documentLoader.get(); } 131 DocumentLoader* documentLoader() const { return m_documentLoader.get(); }
125 DocumentLoader* policyDocumentLoader() const { return m_policyDocumentLoader .get(); } 132 DocumentLoader* policyDocumentLoader() const { return m_policyDocumentLoader .get(); }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 bool allowPlugins(ReasonForCallingAllowPlugins); 224 bool allowPlugins(ReasonForCallingAllowPlugins);
218 225
219 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSour ce, PassRefPtr<SerializedScriptValue>, const String& title); 226 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSour ce, PassRefPtr<SerializedScriptValue>, const String& title);
220 227
221 private: 228 private:
222 bool allChildrenAreComplete() const; // immediate children, not all descenda nts 229 bool allChildrenAreComplete() const; // immediate children, not all descenda nts
223 230
224 void completed(); 231 void completed();
225 232
226 void checkTimerFired(Timer<FrameLoader>*); 233 void checkTimerFired(Timer<FrameLoader>*);
234 void didAccessInitialDocumentTimerFired(Timer<FrameLoader>*);
227 235
228 void insertDummyHistoryItem(); 236 void insertDummyHistoryItem();
229 237
230 bool prepareRequestForThisFrame(FrameLoadRequest&); 238 bool prepareRequestForThisFrame(FrameLoadRequest&);
231 void setReferrerForFrameRequest(ResourceRequest&, ShouldSendReferrer); 239 void setReferrerForFrameRequest(ResourceRequest&, ShouldSendReferrer);
232 FrameLoadType determineFrameLoadType(const FrameLoadRequest&); 240 FrameLoadType determineFrameLoadType(const FrameLoadRequest&);
233 241
234 SubstituteData defaultSubstituteDataForURL(const KURL&); 242 SubstituteData defaultSubstituteDataForURL(const KURL&);
235 243
236 void checkNavigationPolicyAndContinueFragmentScroll(const NavigationAction&, bool isNewNavigation); 244 void checkNavigationPolicyAndContinueFragmentScroll(const NavigationAction&, bool isNewNavigation);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 bool m_startingClientRedirect; 316 bool m_startingClientRedirect;
309 317
310 SandboxFlags m_forcedSandboxFlags; 318 SandboxFlags m_forcedSandboxFlags;
311 319
312 RefPtr<HistoryItem> m_requestedHistoryItem; 320 RefPtr<HistoryItem> m_requestedHistoryItem;
313 }; 321 };
314 322
315 } // namespace WebCore 323 } // namespace WebCore
316 324
317 #endif // FrameLoader_h 325 #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