Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 enum class InstallNewDocumentReason { kNavigation, kJavascriptURL }; |
|
Nate Chapin
2017/03/17 23:33:18
This method (1) does enough DocumentLoader-related
Mike West
2017/03/21 09:39:30
Maybe add a comment explaining the scope?
Nate Chapin
2017/03/21 19:26:58
Done.
| |
| 220 const AtomicString& mimeType, | 216 void installNewDocument(const DocumentInit&, |
| 221 const AtomicString& encoding, | 217 const AtomicString& mimeType, |
| 222 bool dispatchWindowObjectAvailable, | 218 const AtomicString& encoding, |
| 223 ParserSynchronizationPolicy, | 219 InstallNewDocumentReason, |
| 224 const KURL& overridingURL = KURL()); | 220 ParserSynchronizationPolicy, |
| 221 const KURL& overridingURL); | |
| 222 void didInstallNewDocument(Document*); | |
| 223 void didCommitNavigation(); | |
| 225 | 224 |
| 226 void ensureWriter(const AtomicString& mimeType, | 225 void ensureWriter(const AtomicString& mimeType, |
| 227 const KURL& overridingURL = KURL()); | 226 const KURL& overridingURL = KURL()); |
| 228 void endWriting(); | 227 void endWriting(); |
| 229 | 228 |
| 230 // Use these method only where it's guaranteed that |m_frame| hasn't been | 229 // Use these method only where it's guaranteed that |m_frame| hasn't been |
| 231 // cleared. | 230 // cleared. |
| 232 FrameLoader& frameLoader() const; | 231 FrameLoader& frameLoader() const; |
| 233 LocalFrameClient& localFrameClient() const; | 232 LocalFrameClient& localFrameClient() const; |
| 234 | 233 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 // Used to protect against reentrancy into dataReceived(). | 323 // Used to protect against reentrancy into dataReceived(). |
| 325 bool m_inDataReceived; | 324 bool m_inDataReceived; |
| 326 RefPtr<SharedBuffer> m_dataBuffer; | 325 RefPtr<SharedBuffer> m_dataBuffer; |
| 327 }; | 326 }; |
| 328 | 327 |
| 329 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 328 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 330 | 329 |
| 331 } // namespace blink | 330 } // namespace blink |
| 332 | 331 |
| 333 #endif // DocumentLoader_h | 332 #endif // DocumentLoader_h |
| OLD | NEW |