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

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

Issue 1364863002: DocumentLoader::isCommittedButEmpty is timing-dependent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Emulate onPageFinished Created 4 years, 4 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) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 void didChangePerformanceTiming(); 101 void didChangePerformanceTiming();
102 void didObserveLoadingBehavior(WebLoadingBehaviorFlag); 102 void didObserveLoadingBehavior(WebLoadingBehaviorFlag);
103 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSour ce); 103 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSour ce);
104 const ResourceResponse& response() const { return m_response; } 104 const ResourceResponse& response() const { return m_response; }
105 bool isClientRedirect() const { return m_isClientRedirect; } 105 bool isClientRedirect() const { return m_isClientRedirect; }
106 void setIsClientRedirect(bool isClientRedirect) { m_isClientRedirect = isCli entRedirect; } 106 void setIsClientRedirect(bool isClientRedirect) { m_isClientRedirect = isCli entRedirect; }
107 bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistoryIte m; } 107 bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistoryIte m; }
108 void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_repl acesCurrentHistoryItem = replacesCurrentHistoryItem; } 108 void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_repl acesCurrentHistoryItem = replacesCurrentHistoryItem; }
109 109
110 bool isCommittedButEmpty() const { return m_state == Committed; } 110 bool isCommittedButEmpty() const { return m_state >= Committed && !m_dataRec eived; }
111 111
112 void setSentDidFinishLoad() { m_state = SentDidFinishLoad; } 112 void setSentDidFinishLoad() { m_state = SentDidFinishLoad; }
113 bool sentDidFinishLoad() const { return m_state == SentDidFinishLoad; } 113 bool sentDidFinishLoad() const { return m_state == SentDidFinishLoad; }
114 114
115 NavigationType getNavigationType() const { return m_navigationType; } 115 NavigationType getNavigationType() const { return m_navigationType; }
116 void setNavigationType(NavigationType navigationType) { m_navigationType = n avigationType; } 116 void setNavigationType(NavigationType navigationType) { m_navigationType = n avigationType; }
117 117
118 void upgradeInsecureRequest(); 118 void upgradeInsecureRequest();
119 119
120 void startLoadingMainResource(); 120 void startLoadingMainResource();
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 // The 'working' request. It may be mutated 207 // The 'working' request. It may be mutated
208 // several times from the original request to include additional 208 // several times from the original request to include additional
209 // headers, cookie information, canonicalization and redirects. 209 // headers, cookie information, canonicalization and redirects.
210 ResourceRequest m_request; 210 ResourceRequest m_request;
211 211
212 ResourceResponse m_response; 212 ResourceResponse m_response;
213 213
214 bool m_isClientRedirect; 214 bool m_isClientRedirect;
215 bool m_replacesCurrentHistoryItem; 215 bool m_replacesCurrentHistoryItem;
216 bool m_dataReceived;
216 217
217 NavigationType m_navigationType; 218 NavigationType m_navigationType;
218 219
219 DocumentLoadTiming m_documentLoadTiming; 220 DocumentLoadTiming m_documentLoadTiming;
220 221
221 double m_timeOfLastDataReceived; 222 double m_timeOfLastDataReceived;
222 223
223 Member<ApplicationCacheHost> m_applicationCacheHost; 224 Member<ApplicationCacheHost> m_applicationCacheHost;
224 225
225 Member<ContentSecurityPolicy> m_contentSecurityPolicy; 226 Member<ContentSecurityPolicy> m_contentSecurityPolicy;
226 ClientHintsPreferences m_clientHintsPreferences; 227 ClientHintsPreferences m_clientHintsPreferences;
227 InitialScrollState m_initialScrollState; 228 InitialScrollState m_initialScrollState;
228 229
229 bool m_wasBlockedAfterXFrameOptionsOrCSP; 230 bool m_wasBlockedAfterXFrameOptionsOrCSP;
230 231
231 enum State { 232 enum State {
232 NotStarted, 233 NotStarted,
233 Provisional, 234 Provisional,
234 Committed, 235 Committed,
235 DataReceived,
236 MainResourceDone, 236 MainResourceDone,
237 SentDidFinishLoad 237 SentDidFinishLoad
238 }; 238 };
239 State m_state; 239 State m_state;
240 240
241 // Used to protect against reentrancy into dataReceived(). 241 // Used to protect against reentrancy into dataReceived().
242 bool m_inDataReceived; 242 bool m_inDataReceived;
243 RefPtr<SharedBuffer> m_dataBuffer; 243 RefPtr<SharedBuffer> m_dataBuffer;
244 }; 244 };
245 245
246 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); 246 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader);
247 247
248 } // namespace blink 248 } // namespace blink
249 249
250 #endif // DocumentLoader_h 250 #endif // DocumentLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698