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

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

Issue 2171063002: Notify the Blink client synchronously if the initial doc is accessed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments. Created 4 years, 5 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 // Warning: stopAllLoaders can and will detach the LocalFrame out from under you. All callers need to either protect the LocalFrame 94 // Warning: stopAllLoaders can and will detach the LocalFrame out from under you. All callers need to either protect the LocalFrame
95 // or guarantee they won't in any way access the LocalFrame after stopAllLoa ders returns. 95 // or guarantee they won't in any way access the LocalFrame after stopAllLoa ders returns.
96 void stopAllLoaders(); 96 void stopAllLoaders();
97 97
98 // FIXME: clear() is trying to do too many things. We should break it down i nto smaller functions. 98 // FIXME: clear() is trying to do too many things. We should break it down i nto smaller functions.
99 void clear(); 99 void clear();
100 100
101 void replaceDocumentWhileExecutingJavaScriptURL(const String& source, Docume nt* ownerDocument); 101 void replaceDocumentWhileExecutingJavaScriptURL(const String& source, Docume nt* ownerDocument);
102 102
103 // Sets a timer to notify the client that the initial empty document has 103 // Notifies the client that the initial empty document has been accessed,
104 // been accessed, and thus it is no longer safe to show a provisional URL 104 // and thus it is no longer safe to show a provisional URL above the
105 // above the document without risking a URL spoof. 105 // document without risking a URL spoof. The client must not call back into
106 // JavaScript.
106 void didAccessInitialDocument(); 107 void didAccessInitialDocument();
107 108
108 // If the initial empty document is showing and has been accessed, this
109 // cancels the timer and immediately notifies the client in cases that
110 // waiting to notify would allow a URL spoof.
111 void notifyIfInitialDocumentAccessed();
112
113 DocumentLoader* documentLoader() const { return m_documentLoader.get(); } 109 DocumentLoader* documentLoader() const { return m_documentLoader.get(); }
114 DocumentLoader* provisionalDocumentLoader() const { return m_provisionalDocu mentLoader.get(); } 110 DocumentLoader* provisionalDocumentLoader() const { return m_provisionalDocu mentLoader.get(); }
115 111
116 void loadFailed(DocumentLoader*, const ResourceError&); 112 void loadFailed(DocumentLoader*, const ResourceError&);
117 113
118 bool isLoadingMainFrame() const; 114 bool isLoadingMainFrame() const;
119 115
120 bool shouldTreatURLAsSameAsCurrent(const KURL&) const; 116 bool shouldTreatURLAsSameAsCurrent(const KURL&) const;
121 bool shouldTreatURLAsSrcdocDocument(const KURL&) const; 117 bool shouldTreatURLAsSrcdocDocument(const KURL&) const;
122 118
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 HistoryLoadType m_historyLoadType; 270 HistoryLoadType m_historyLoadType;
275 }; 271 };
276 272
277 Member<DeferredHistoryLoad> m_deferredHistoryLoad; 273 Member<DeferredHistoryLoad> m_deferredHistoryLoad;
278 274
279 bool m_inStopAllLoaders; 275 bool m_inStopAllLoaders;
280 276
281 Timer<FrameLoader> m_checkTimer; 277 Timer<FrameLoader> m_checkTimer;
282 278
283 bool m_didAccessInitialDocument; 279 bool m_didAccessInitialDocument;
284 Timer<FrameLoader> m_didAccessInitialDocumentTimer;
285 280
286 SandboxFlags m_forcedSandboxFlags; 281 SandboxFlags m_forcedSandboxFlags;
287 282
288 bool m_dispatchingDidClearWindowObjectInMainWorld; 283 bool m_dispatchingDidClearWindowObjectInMainWorld;
289 bool m_protectProvisionalLoader; 284 bool m_protectProvisionalLoader;
290 }; 285 };
291 286
292 } // namespace blink 287 } // namespace blink
293 288
294 #endif // FrameLoader_h 289 #endif // FrameLoader_h
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698