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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 97 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSour ce); | 97 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSour ce); |
| 98 void stopLoading(); | 98 void stopLoading(); |
| 99 bool isLoading() const; | 99 bool isLoading() const; |
| 100 const ResourceResponse& response() const { return m_response; } | 100 const ResourceResponse& response() const { return m_response; } |
| 101 const ResourceError& mainDocumentError() const { return m_mainDocumentError; } | 101 const ResourceError& mainDocumentError() const { return m_mainDocumentError; } |
| 102 bool isClientRedirect() const { return m_isClientRedirect; } | 102 bool isClientRedirect() const { return m_isClientRedirect; } |
| 103 void setIsClientRedirect(bool isClientRedirect) { m_isClientRedirect = isCli entRedirect; } | 103 void setIsClientRedirect(bool isClientRedirect) { m_isClientRedirect = isCli entRedirect; } |
| 104 bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistoryIte m; } | 104 bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistoryIte m; } |
| 105 void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_repl acesCurrentHistoryItem = replacesCurrentHistoryItem; } | 105 void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_repl acesCurrentHistoryItem = replacesCurrentHistoryItem; } |
| 106 | 106 |
| 107 bool isCommittedButEmpty() const { return m_state == Committed; } | 107 bool isCommittedButEmpty() const { return m_state == Committed || m_state == MainResourceDoneEmpty; } |
| 108 | 108 |
| 109 bool shouldContinueForNavigationPolicy(const ResourceRequest&, ContentSecuri tyPolicyDisposition shouldCheckMainWorldContentSecurityPolicy, NavigationPolicy = NavigationPolicyCurrentTab); | 109 bool shouldContinueForNavigationPolicy(const ResourceRequest&, ContentSecuri tyPolicyDisposition shouldCheckMainWorldContentSecurityPolicy, NavigationPolicy = NavigationPolicyCurrentTab); |
| 110 NavigationType navigationType() const { return m_navigationType; } | 110 NavigationType navigationType() const { return m_navigationType; } |
| 111 void setNavigationType(NavigationType navigationType) { m_navigationType = n avigationType; } | 111 void setNavigationType(NavigationType navigationType) { m_navigationType = n avigationType; } |
| 112 | 112 |
| 113 void setDefersLoading(bool); | 113 void setDefersLoading(bool); |
| 114 | 114 |
| 115 void startLoadingMainResource(); | 115 void startLoadingMainResource(); |
| 116 void cancelMainResourceLoad(const ResourceError&); | 116 void cancelMainResourceLoad(const ResourceError&); |
| 117 | 117 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 227 | 227 |
| 228 RefPtrWillBeMember<ContentSecurityPolicy> m_contentSecurityPolicy; | 228 RefPtrWillBeMember<ContentSecurityPolicy> m_contentSecurityPolicy; |
| 229 ClientHintsPreferences m_clientHintsPreferences; | 229 ClientHintsPreferences m_clientHintsPreferences; |
| 230 InitialScrollState m_initialScrollState; | 230 InitialScrollState m_initialScrollState; |
| 231 | 231 |
| 232 enum State { | 232 enum State { |
| 233 NotStarted, | 233 NotStarted, |
| 234 Provisional, | 234 Provisional, |
| 235 Committed, | 235 Committed, |
| 236 DataReceived, | 236 DataReceived, |
| 237 MainResourceDone | 237 MainResourceDone, |
| 238 MainResourceDoneEmpty | |
|
dcheng
2015/09/21 16:43:52
Would it make sense to call this "DoneButEmpty" to
Nate Chapin
2015/09/21 16:45:30
Yeah, probably. Will update before landing.
| |
| 238 }; | 239 }; |
| 239 State m_state; | 240 State m_state; |
| 240 | 241 |
| 241 // Used to protect against reentrancy into dataReceived(). | 242 // Used to protect against reentrancy into dataReceived(). |
| 242 bool m_inDataReceived; | 243 bool m_inDataReceived; |
| 243 RefPtr<SharedBuffer> m_dataBuffer; | 244 RefPtr<SharedBuffer> m_dataBuffer; |
| 244 }; | 245 }; |
| 245 | 246 |
| 246 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 247 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 247 | 248 |
| 248 } // namespace blink | 249 } // namespace blink |
| 249 | 250 |
| 250 #endif // DocumentLoader_h | 251 #endif // DocumentLoader_h |
| OLD | NEW |