| 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 17 matching lines...) Expand all Loading... |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #ifndef DocumentLoader_h | 30 #ifndef DocumentLoader_h |
| 31 #define DocumentLoader_h | 31 #define DocumentLoader_h |
| 32 | 32 |
| 33 #include "core/CoreExport.h" | 33 #include "core/CoreExport.h" |
| 34 #include "core/dom/WeakIdentifierMap.h" | 34 #include "core/dom/WeakIdentifierMap.h" |
| 35 #include "core/fetch/ClientHintsPreferences.h" | 35 #include "core/fetch/ClientHintsPreferences.h" |
| 36 #include "core/fetch/RawResource.h" | 36 #include "core/fetch/RawResource.h" |
| 37 #include "core/fetch/ResourceLoaderOptions.h" | 37 #include "core/fetch/ResourceLoaderOptions.h" |
| 38 #include "core/fetch/ResourcePtr.h" | |
| 39 #include "core/fetch/SubstituteData.h" | 38 #include "core/fetch/SubstituteData.h" |
| 40 #include "core/frame/csp/ContentSecurityPolicy.h" | 39 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 41 #include "core/loader/DocumentLoadTiming.h" | 40 #include "core/loader/DocumentLoadTiming.h" |
| 42 #include "core/loader/DocumentWriter.h" | 41 #include "core/loader/DocumentWriter.h" |
| 43 #include "core/loader/FrameLoaderTypes.h" | 42 #include "core/loader/FrameLoaderTypes.h" |
| 44 #include "core/loader/NavigationPolicy.h" | 43 #include "core/loader/NavigationPolicy.h" |
| 45 #include "platform/SharedBuffer.h" | 44 #include "platform/SharedBuffer.h" |
| 46 #include "platform/network/ResourceError.h" | 45 #include "platform/network/ResourceError.h" |
| 47 #include "platform/network/ResourceRequest.h" | 46 #include "platform/network/ResourceRequest.h" |
| 48 #include "platform/network/ResourceResponse.h" | 47 #include "platform/network/ResourceResponse.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 { | 136 { |
| 138 } | 137 } |
| 139 | 138 |
| 140 bool wasScrolledByUser; | 139 bool wasScrolledByUser; |
| 141 bool didRestoreFromHistory; | 140 bool didRestoreFromHistory; |
| 142 }; | 141 }; |
| 143 InitialScrollState& initialScrollState() { return m_initialScrollState; } | 142 InitialScrollState& initialScrollState() { return m_initialScrollState; } |
| 144 | 143 |
| 145 bool loadingMultipartContent() const; | 144 bool loadingMultipartContent() const; |
| 146 | 145 |
| 147 ResourcePtr<Resource> startPreload(Resource::Type, FetchRequest&); | 146 Resource* startPreload(Resource::Type, FetchRequest&); |
| 148 | 147 |
| 149 DECLARE_VIRTUAL_TRACE(); | 148 DECLARE_VIRTUAL_TRACE(); |
| 150 | 149 |
| 151 protected: | 150 protected: |
| 152 DocumentLoader(LocalFrame*, const ResourceRequest&, const SubstituteData&); | 151 DocumentLoader(LocalFrame*, const ResourceRequest&, const SubstituteData&); |
| 153 | 152 |
| 154 Vector<KURL> m_redirectChain; | 153 Vector<KURL> m_redirectChain; |
| 155 | 154 |
| 156 private: | 155 private: |
| 157 static PassRefPtrWillBeRawPtr<DocumentWriter> createWriterFor(const Document
* ownerDocument, const DocumentInit&, const AtomicString& mimeType, const Atomic
String& encoding, bool dispatch, ParserSynchronizationPolicy); | 156 static PassRefPtrWillBeRawPtr<DocumentWriter> createWriterFor(const Document
* ownerDocument, const DocumentInit&, const AtomicString& mimeType, const Atomic
String& encoding, bool dispatch, ParserSynchronizationPolicy); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 182 | 181 |
| 183 bool maybeLoadEmpty(); | 182 bool maybeLoadEmpty(); |
| 184 | 183 |
| 185 bool isRedirectAfterPost(const ResourceRequest&, const ResourceResponse&); | 184 bool isRedirectAfterPost(const ResourceRequest&, const ResourceResponse&); |
| 186 | 185 |
| 187 bool shouldContinueForResponse() const; | 186 bool shouldContinueForResponse() const; |
| 188 | 187 |
| 189 RawPtrWillBeMember<LocalFrame> m_frame; | 188 RawPtrWillBeMember<LocalFrame> m_frame; |
| 190 PersistentWillBeMember<ResourceFetcher> m_fetcher; | 189 PersistentWillBeMember<ResourceFetcher> m_fetcher; |
| 191 | 190 |
| 192 ResourcePtr<RawResource> m_mainResource; | 191 RefPtrWillBeMember<RawResource> m_mainResource; |
| 193 | 192 |
| 194 RefPtrWillBeMember<DocumentWriter> m_writer; | 193 RefPtrWillBeMember<DocumentWriter> m_writer; |
| 195 | 194 |
| 196 // A reference to actual request used to create the data source. | 195 // A reference to actual request used to create the data source. |
| 197 // The only part of this request that should change is the url, and | 196 // The only part of this request that should change is the url, and |
| 198 // that only in the case of a same-document navigation. | 197 // that only in the case of a same-document navigation. |
| 199 ResourceRequest m_originalRequest; | 198 ResourceRequest m_originalRequest; |
| 200 | 199 |
| 201 SubstituteData m_substituteData; | 200 SubstituteData m_substituteData; |
| 202 | 201 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // Used to protect against reentrancy into dataReceived(). | 234 // Used to protect against reentrancy into dataReceived(). |
| 236 bool m_inDataReceived; | 235 bool m_inDataReceived; |
| 237 RefPtr<SharedBuffer> m_dataBuffer; | 236 RefPtr<SharedBuffer> m_dataBuffer; |
| 238 }; | 237 }; |
| 239 | 238 |
| 240 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 239 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 241 | 240 |
| 242 } // namespace blink | 241 } // namespace blink |
| 243 | 242 |
| 244 #endif // DocumentLoader_h | 243 #endif // DocumentLoader_h |
| OLD | NEW |