| 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 12 matching lines...) Expand all Loading... |
| 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #ifndef DocumentLoader_h | 30 #ifndef DocumentLoader_h |
| 31 #define DocumentLoader_h | 31 #define DocumentLoader_h |
| 32 | 32 |
| 33 #include <memory> |
| 34 #include "bindings/core/v8/SourceLocation.h" |
| 33 #include "core/CoreExport.h" | 35 #include "core/CoreExport.h" |
| 34 #include "core/dom/ViewportDescription.h" | 36 #include "core/dom/ViewportDescription.h" |
| 35 #include "core/dom/WeakIdentifierMap.h" | 37 #include "core/dom/WeakIdentifierMap.h" |
| 36 #include "core/frame/FrameTypes.h" | 38 #include "core/frame/FrameTypes.h" |
| 37 #include "core/frame/csp/ContentSecurityPolicy.h" | 39 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 38 #include "core/loader/DocumentLoadTiming.h" | 40 #include "core/loader/DocumentLoadTiming.h" |
| 39 #include "core/loader/DocumentWriter.h" | 41 #include "core/loader/DocumentWriter.h" |
| 40 #include "core/loader/FrameLoaderTypes.h" | 42 #include "core/loader/FrameLoaderTypes.h" |
| 41 #include "core/loader/LinkLoader.h" | 43 #include "core/loader/LinkLoader.h" |
| 42 #include "core/loader/NavigationPolicy.h" | 44 #include "core/loader/NavigationPolicy.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 InitialScrollState& initialScrollState() { return m_initialScrollState; } | 178 InitialScrollState& initialScrollState() { return m_initialScrollState; } |
| 177 | 179 |
| 178 void setWasBlockedAfterCSP() { m_wasBlockedAfterCSP = true; } | 180 void setWasBlockedAfterCSP() { m_wasBlockedAfterCSP = true; } |
| 179 bool wasBlockedAfterCSP() { return m_wasBlockedAfterCSP; } | 181 bool wasBlockedAfterCSP() { return m_wasBlockedAfterCSP; } |
| 180 | 182 |
| 181 void dispatchLinkHeaderPreloads(ViewportDescriptionWrapper*, | 183 void dispatchLinkHeaderPreloads(ViewportDescriptionWrapper*, |
| 182 LinkLoader::MediaPreloadPolicy); | 184 LinkLoader::MediaPreloadPolicy); |
| 183 | 185 |
| 184 Resource* startPreload(Resource::Type, FetchRequest&); | 186 Resource* startPreload(Resource::Type, FetchRequest&); |
| 185 | 187 |
| 188 std::unique_ptr<SourceLocation> copySourceLocation() const; |
| 189 void setSourceLocation(std::unique_ptr<SourceLocation>); |
| 190 |
| 186 DECLARE_VIRTUAL_TRACE(); | 191 DECLARE_VIRTUAL_TRACE(); |
| 187 | 192 |
| 188 protected: | 193 protected: |
| 189 DocumentLoader(LocalFrame*, | 194 DocumentLoader(LocalFrame*, |
| 190 const ResourceRequest&, | 195 const ResourceRequest&, |
| 191 const SubstituteData&, | 196 const SubstituteData&, |
| 192 ClientRedirectPolicy); | 197 ClientRedirectPolicy); |
| 193 | 198 |
| 194 Vector<KURL> m_redirectChain; | 199 Vector<KURL> m_redirectChain; |
| 195 | 200 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 double m_timeOfLastDataReceived; | 281 double m_timeOfLastDataReceived; |
| 277 | 282 |
| 278 Member<ApplicationCacheHost> m_applicationCacheHost; | 283 Member<ApplicationCacheHost> m_applicationCacheHost; |
| 279 | 284 |
| 280 Member<ContentSecurityPolicy> m_contentSecurityPolicy; | 285 Member<ContentSecurityPolicy> m_contentSecurityPolicy; |
| 281 ClientHintsPreferences m_clientHintsPreferences; | 286 ClientHintsPreferences m_clientHintsPreferences; |
| 282 InitialScrollState m_initialScrollState; | 287 InitialScrollState m_initialScrollState; |
| 283 | 288 |
| 284 bool m_wasBlockedAfterCSP; | 289 bool m_wasBlockedAfterCSP; |
| 285 | 290 |
| 291 // PlzNavigate: set when committing a navigation. The data has originally been |
| 292 // captured when the navigation was sent to the browser process, and it is |
| 293 // sent back at commit time. |
| 294 std::unique_ptr<SourceLocation> m_sourceLocation; |
| 295 |
| 286 enum State { | 296 enum State { |
| 287 NotStarted, | 297 NotStarted, |
| 288 Provisional, | 298 Provisional, |
| 289 Committed, | 299 Committed, |
| 290 SentDidFinishLoad | 300 SentDidFinishLoad |
| 291 }; | 301 }; |
| 292 State m_state; | 302 State m_state; |
| 293 | 303 |
| 294 // Used to protect against reentrancy into dataReceived(). | 304 // Used to protect against reentrancy into dataReceived(). |
| 295 bool m_inDataReceived; | 305 bool m_inDataReceived; |
| 296 RefPtr<SharedBuffer> m_dataBuffer; | 306 RefPtr<SharedBuffer> m_dataBuffer; |
| 297 }; | 307 }; |
| 298 | 308 |
| 299 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 309 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 300 | 310 |
| 301 } // namespace blink | 311 } // namespace blink |
| 302 | 312 |
| 303 #endif // DocumentLoader_h | 313 #endif // DocumentLoader_h |
| OLD | NEW |