| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 void setServiceWorkerNetworkProvider( | 195 void setServiceWorkerNetworkProvider( |
| 194 std::unique_ptr<WebServiceWorkerNetworkProvider>); | 196 std::unique_ptr<WebServiceWorkerNetworkProvider>); |
| 195 | 197 |
| 196 // May return null before the first HTML tag is inserted by the | 198 // May return null before the first HTML tag is inserted by the |
| 197 // parser (before didCreateDataSource is called), after the document | 199 // parser (before didCreateDataSource is called), after the document |
| 198 // is detached from frame, or in tests. | 200 // is detached from frame, or in tests. |
| 199 WebServiceWorkerNetworkProvider* getServiceWorkerNetworkProvider() { | 201 WebServiceWorkerNetworkProvider* getServiceWorkerNetworkProvider() { |
| 200 return m_serviceWorkerNetworkProvider.get(); | 202 return m_serviceWorkerNetworkProvider.get(); |
| 201 } | 203 } |
| 202 | 204 |
| 205 std::unique_ptr<SourceLocation> copySourceLocation() const; |
| 206 void setSourceLocation(std::unique_ptr<SourceLocation>); |
| 207 |
| 203 DECLARE_VIRTUAL_TRACE(); | 208 DECLARE_VIRTUAL_TRACE(); |
| 204 | 209 |
| 205 protected: | 210 protected: |
| 206 DocumentLoader(LocalFrame*, | 211 DocumentLoader(LocalFrame*, |
| 207 const ResourceRequest&, | 212 const ResourceRequest&, |
| 208 const SubstituteData&, | 213 const SubstituteData&, |
| 209 ClientRedirectPolicy); | 214 ClientRedirectPolicy); |
| 210 | 215 |
| 211 Vector<KURL> m_redirectChain; | 216 Vector<KURL> m_redirectChain; |
| 212 | 217 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 301 |
| 297 std::unique_ptr<WebServiceWorkerNetworkProvider> | 302 std::unique_ptr<WebServiceWorkerNetworkProvider> |
| 298 m_serviceWorkerNetworkProvider; | 303 m_serviceWorkerNetworkProvider; |
| 299 | 304 |
| 300 Member<ContentSecurityPolicy> m_contentSecurityPolicy; | 305 Member<ContentSecurityPolicy> m_contentSecurityPolicy; |
| 301 ClientHintsPreferences m_clientHintsPreferences; | 306 ClientHintsPreferences m_clientHintsPreferences; |
| 302 InitialScrollState m_initialScrollState; | 307 InitialScrollState m_initialScrollState; |
| 303 | 308 |
| 304 bool m_wasBlockedAfterCSP; | 309 bool m_wasBlockedAfterCSP; |
| 305 | 310 |
| 311 // PlzNavigate: set when committing a navigation. The data has originally been |
| 312 // captured when the navigation was sent to the browser process, and it is |
| 313 // sent back at commit time. |
| 314 std::unique_ptr<SourceLocation> m_sourceLocation; |
| 315 |
| 306 enum State { | 316 enum State { |
| 307 NotStarted, | 317 NotStarted, |
| 308 Provisional, | 318 Provisional, |
| 309 Committed, | 319 Committed, |
| 310 SentDidFinishLoad | 320 SentDidFinishLoad |
| 311 }; | 321 }; |
| 312 State m_state; | 322 State m_state; |
| 313 | 323 |
| 314 // Used to protect against reentrancy into dataReceived(). | 324 // Used to protect against reentrancy into dataReceived(). |
| 315 bool m_inDataReceived; | 325 bool m_inDataReceived; |
| 316 RefPtr<SharedBuffer> m_dataBuffer; | 326 RefPtr<SharedBuffer> m_dataBuffer; |
| 317 }; | 327 }; |
| 318 | 328 |
| 319 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 329 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 320 | 330 |
| 321 } // namespace blink | 331 } // namespace blink |
| 322 | 332 |
| 323 #endif // DocumentLoader_h | 333 #endif // DocumentLoader_h |
| OLD | NEW |