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

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

Issue 2751833002: Clean up DocumentWriter creation's FrameLoader interaction (Closed)
Patch Set: Rebase + nits Created 3 years, 9 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 | third_party/WebKit/Source/core/loader/DocumentLoader.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 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 DocumentLoadTiming& timing() { return m_documentLoadTiming; } 159 DocumentLoadTiming& timing() { return m_documentLoadTiming; }
160 const DocumentLoadTiming& timing() const { return m_documentLoadTiming; } 160 const DocumentLoadTiming& timing() const { return m_documentLoadTiming; }
161 161
162 ApplicationCacheHost* applicationCacheHost() const { 162 ApplicationCacheHost* applicationCacheHost() const {
163 return m_applicationCacheHost.get(); 163 return m_applicationCacheHost.get();
164 } 164 }
165 165
166 void clearRedirectChain(); 166 void clearRedirectChain();
167 void appendRedirect(const KURL&); 167 void appendRedirect(const KURL&);
168 168
169 ContentSecurityPolicy* releaseContentSecurityPolicy() {
170 return m_contentSecurityPolicy.release();
171 }
172
173 ClientHintsPreferences& clientHintsPreferences() { 169 ClientHintsPreferences& clientHintsPreferences() {
174 return m_clientHintsPreferences; 170 return m_clientHintsPreferences;
175 } 171 }
176 172
177 struct InitialScrollState { 173 struct InitialScrollState {
178 DISALLOW_NEW(); 174 DISALLOW_NEW();
179 InitialScrollState() 175 InitialScrollState()
180 : wasScrolledByUser(false), didRestoreFromHistory(false) {} 176 : wasScrolledByUser(false), didRestoreFromHistory(false) {}
181 177
182 bool wasScrolledByUser; 178 bool wasScrolledByUser;
(...skipping 26 matching lines...) Expand all
209 205
210 protected: 206 protected:
211 DocumentLoader(LocalFrame*, 207 DocumentLoader(LocalFrame*,
212 const ResourceRequest&, 208 const ResourceRequest&,
213 const SubstituteData&, 209 const SubstituteData&,
214 ClientRedirectPolicy); 210 ClientRedirectPolicy);
215 211
216 Vector<KURL> m_redirectChain; 212 Vector<KURL> m_redirectChain;
217 213
218 private: 214 private:
219 static DocumentWriter* createWriterFor(const DocumentInit&, 215 // installNewDocument() does the work of creating a Document and
220 const AtomicString& mimeType, 216 // DocumentWriter, as well as creating a new LocalDOMWindow if needed. It also
221 const AtomicString& encoding, 217 // initalizes a bunch of state on the Document (e.g., the state based on
222 bool dispatchWindowObjectAvailable, 218 // response headers).
223 ParserSynchronizationPolicy, 219 enum class InstallNewDocumentReason { kNavigation, kJavascriptURL };
224 const KURL& overridingURL = KURL()); 220 void installNewDocument(const DocumentInit&,
221 const AtomicString& mimeType,
222 const AtomicString& encoding,
223 InstallNewDocumentReason,
224 ParserSynchronizationPolicy,
225 const KURL& overridingURL);
226 void didInstallNewDocument(Document*);
227 void didCommitNavigation();
225 228
226 void ensureWriter(const AtomicString& mimeType, 229 void ensureWriter(const AtomicString& mimeType,
227 const KURL& overridingURL = KURL()); 230 const KURL& overridingURL = KURL());
228 void endWriting(); 231 void endWriting();
229 232
230 // Use these method only where it's guaranteed that |m_frame| hasn't been 233 // Use these method only where it's guaranteed that |m_frame| hasn't been
231 // cleared. 234 // cleared.
232 FrameLoader& frameLoader() const; 235 FrameLoader& frameLoader() const;
233 LocalFrameClient& localFrameClient() const; 236 LocalFrameClient& localFrameClient() const;
234 237
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 // Used to protect against reentrancy into dataReceived(). 327 // Used to protect against reentrancy into dataReceived().
325 bool m_inDataReceived; 328 bool m_inDataReceived;
326 RefPtr<SharedBuffer> m_dataBuffer; 329 RefPtr<SharedBuffer> m_dataBuffer;
327 }; 330 };
328 331
329 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); 332 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader);
330 333
331 } // namespace blink 334 } // namespace blink
332 335
333 #endif // DocumentLoader_h 336 #endif // DocumentLoader_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698