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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 const SubstituteData& substituteData() const { return m_substituteData; } | 87 const SubstituteData& substituteData() const { return m_substituteData; } |
| 88 | 88 |
| 89 const KURL& url() const; | 89 const KURL& url() const; |
| 90 const KURL& unreachableURL() const; | 90 const KURL& unreachableURL() const; |
| 91 const KURL& urlForHistory() const; | 91 const KURL& urlForHistory() const; |
| 92 | 92 |
| 93 const AtomicString& responseMIMEType() const; | 93 const AtomicString& responseMIMEType() const; |
| 94 | 94 |
| 95 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigation Source); | 95 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigation Source); |
| 96 void stopLoading(); | 96 void stopLoading(); |
| 97 bool isCommitted() const { return m_committed; } | |
| 98 bool isLoading() const; | 97 bool isLoading() const; |
| 99 bool isLoadingMainResource() const { return m_loadingMainResource; } | |
| 100 const ResourceResponse& response() const { return m_response; } | 98 const ResourceResponse& response() const { return m_response; } |
| 101 const ResourceError& mainDocumentError() const { return m_mainDocumentEr ror; } | 99 const ResourceError& mainDocumentError() const { return m_mainDocumentEr ror; } |
| 102 bool isClientRedirect() const { return m_isClientRedirect; } | 100 bool isClientRedirect() const { return m_isClientRedirect; } |
| 103 void setIsClientRedirect(bool isClientRedirect) { m_isClientRedirect = i sClientRedirect; } | 101 void setIsClientRedirect(bool isClientRedirect) { m_isClientRedirect = i sClientRedirect; } |
| 104 bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistor yItem; } | 102 bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistor yItem; } |
| 105 void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_ replacesCurrentHistoryItem = replacesCurrentHistoryItem; } | 103 void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_ replacesCurrentHistoryItem = replacesCurrentHistoryItem; } |
| 106 | 104 |
| 105 bool isCommittedButEmpty() const { return m_state == Committed; } | |
|
dcheng
2015/07/13 20:53:56
Does this imply that mainReceivedError/finishedLoa
Nate Chapin
2015/07/13 21:13:28
The most common case would be that this is called
| |
| 106 | |
| 107 bool shouldContinueForNavigationPolicy(const ResourceRequest&, ContentSe curityPolicyDisposition shouldCheckMainWorldContentSecurityPolicy, NavigationPol icy = NavigationPolicyCurrentTab); | 107 bool shouldContinueForNavigationPolicy(const ResourceRequest&, ContentSe curityPolicyDisposition shouldCheckMainWorldContentSecurityPolicy, NavigationPol icy = NavigationPolicyCurrentTab); |
| 108 NavigationType navigationType() const { return m_navigationType; } | 108 NavigationType navigationType() const { return m_navigationType; } |
| 109 void setNavigationType(NavigationType navigationType) { m_navigationType = navigationType; } | 109 void setNavigationType(NavigationType navigationType) { m_navigationType = navigationType; } |
| 110 | 110 |
| 111 void setDefersLoading(bool); | 111 void setDefersLoading(bool); |
| 112 | 112 |
| 113 void startLoadingMainResource(); | 113 void startLoadingMainResource(); |
| 114 void cancelMainResourceLoad(const ResourceError&); | 114 void cancelMainResourceLoad(const ResourceError&); |
| 115 | 115 |
| 116 void attachThreadedDataReceiver(PassRefPtrWillBeRawPtr<ThreadedDataRecei ver>); | 116 void attachThreadedDataReceiver(PassRefPtrWillBeRawPtr<ThreadedDataRecei ver>); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 static PassRefPtrWillBeRawPtr<DocumentWriter> createWriterFor(const Docu ment* ownerDocument, const DocumentInit&, const AtomicString& mimeType, const At omicString& encoding, bool dispatch, ParserSynchronizationPolicy); | 154 static PassRefPtrWillBeRawPtr<DocumentWriter> createWriterFor(const Docu ment* ownerDocument, const DocumentInit&, const AtomicString& mimeType, const At omicString& encoding, bool dispatch, ParserSynchronizationPolicy); |
| 155 | 155 |
| 156 void ensureWriter(const AtomicString& mimeType, const KURL& overridingUR L = KURL()); | 156 void ensureWriter(const AtomicString& mimeType, const KURL& overridingUR L = KURL()); |
| 157 void endWriting(DocumentWriter*); | 157 void endWriting(DocumentWriter*); |
| 158 | 158 |
| 159 Document* document() const; | 159 Document* document() const; |
| 160 FrameLoader* frameLoader() const; | 160 FrameLoader* frameLoader() const; |
| 161 | 161 |
| 162 void commitIfReady(); | 162 void commitIfReady(); |
| 163 void commitData(const char* bytes, size_t length); | 163 void commitData(const char* bytes, size_t length); |
| 164 void clearMainResourceLoader(); | |
| 165 ResourceLoader* mainResourceLoader() const; | 164 ResourceLoader* mainResourceLoader() const; |
| 166 void clearMainResourceHandle(); | 165 void clearMainResourceHandle(); |
| 167 | 166 |
| 168 bool maybeCreateArchive(); | 167 bool maybeCreateArchive(); |
| 169 | 168 |
| 170 void prepareSubframeArchiveLoadIfNeeded(); | 169 void prepareSubframeArchiveLoadIfNeeded(); |
| 171 | 170 |
| 172 void willSendRequest(ResourceRequest&, const ResourceResponse&); | 171 void willSendRequest(ResourceRequest&, const ResourceResponse&); |
| 173 void finishedLoading(double finishTime); | 172 void finishedLoading(double finishTime); |
| 174 void mainReceivedError(const ResourceError&); | 173 void mainReceivedError(const ResourceError&); |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 201 | 200 |
| 202 // The 'working' request. It may be mutated | 201 // The 'working' request. It may be mutated |
| 203 // several times from the original request to include additional | 202 // several times from the original request to include additional |
| 204 // headers, cookie information, canonicalization and redirects. | 203 // headers, cookie information, canonicalization and redirects. |
| 205 ResourceRequest m_request; | 204 ResourceRequest m_request; |
| 206 | 205 |
| 207 ResourceResponse m_response; | 206 ResourceResponse m_response; |
| 208 | 207 |
| 209 ResourceError m_mainDocumentError; | 208 ResourceError m_mainDocumentError; |
| 210 | 209 |
| 211 bool m_committed; | |
| 212 bool m_isClientRedirect; | 210 bool m_isClientRedirect; |
| 213 bool m_replacesCurrentHistoryItem; | 211 bool m_replacesCurrentHistoryItem; |
| 214 | 212 |
| 215 NavigationType m_navigationType; | 213 NavigationType m_navigationType; |
| 216 | 214 |
| 217 RefPtrWillBeMember<MHTMLArchive> m_archive; | 215 RefPtrWillBeMember<MHTMLArchive> m_archive; |
| 218 | 216 |
| 219 bool m_loadingMainResource; | |
| 220 DocumentLoadTiming m_documentLoadTiming; | 217 DocumentLoadTiming m_documentLoadTiming; |
| 221 | 218 |
| 222 double m_timeOfLastDataReceived; | 219 double m_timeOfLastDataReceived; |
| 223 | 220 |
| 224 PersistentWillBeMember<ApplicationCacheHost> m_applicationCacheHost; | 221 PersistentWillBeMember<ApplicationCacheHost> m_applicationCacheHost; |
| 225 | 222 |
| 226 RefPtr<ContentSecurityPolicy> m_contentSecurityPolicy; | 223 RefPtr<ContentSecurityPolicy> m_contentSecurityPolicy; |
| 227 ClientHintsPreferences m_clientHintsPreferences; | 224 ClientHintsPreferences m_clientHintsPreferences; |
| 228 InitialScrollState m_initialScrollState; | 225 InitialScrollState m_initialScrollState; |
| 226 | |
| 227 enum State { | |
| 228 NotStarted, | |
| 229 Provisional, | |
| 230 Committed, | |
| 231 DataReceived, | |
| 232 MainResourceDone | |
| 233 }; | |
| 234 State m_state; | |
| 229 }; | 235 }; |
| 230 | 236 |
| 231 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 237 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 232 | 238 |
| 233 } // namespace blink | 239 } // namespace blink |
| 234 | 240 |
| 235 #endif // DocumentLoader_h | 241 #endif // DocumentLoader_h |
| OLD | NEW |