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 24 matching lines...) Expand all Loading... |
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" | 38 #include "core/fetch/ResourcePtr.h" |
39 #include "core/fetch/SubstituteData.h" | 39 #include "core/fetch/SubstituteData.h" |
40 #include "core/frame/csp/ContentSecurityPolicy.h" | 40 #include "core/frame/csp/ContentSecurityPolicy.h" |
41 #include "core/loader/DocumentLoadTiming.h" | 41 #include "core/loader/DocumentLoadTiming.h" |
42 #include "core/loader/DocumentWriter.h" | 42 #include "core/loader/DocumentWriter.h" |
43 #include "core/loader/FrameLoaderTypes.h" | 43 #include "core/loader/FrameLoaderTypes.h" |
44 #include "core/loader/NavigationPolicy.h" | 44 #include "core/loader/NavigationPolicy.h" |
45 #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" |
49 #include "wtf/HashSet.h" | 48 #include "wtf/HashSet.h" |
50 #include "wtf/RefPtr.h" | 49 #include "wtf/RefPtr.h" |
51 | 50 |
52 namespace blink { | 51 namespace blink { |
53 | 52 |
54 class ApplicationCacheHost; | 53 class ApplicationCacheHost; |
55 class ResourceFetcher; | 54 class ResourceFetcher; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 void prepareSubframeArchiveLoadIfNeeded(); | 170 void prepareSubframeArchiveLoadIfNeeded(); |
172 | 171 |
173 void willSendRequest(ResourceRequest&, const ResourceResponse&); | 172 void willSendRequest(ResourceRequest&, const ResourceResponse&); |
174 void finishedLoading(double finishTime); | 173 void finishedLoading(double finishTime); |
175 void mainReceivedError(const ResourceError&); | 174 void mainReceivedError(const ResourceError&); |
176 void cancelLoadAfterXFrameOptionsOrCSPDenied(const ResourceResponse&); | 175 void cancelLoadAfterXFrameOptionsOrCSPDenied(const ResourceResponse&); |
177 void redirectReceived(Resource*, ResourceRequest&, const ResourceResponse&)
final; | 176 void redirectReceived(Resource*, ResourceRequest&, const ResourceResponse&)
final; |
178 void updateRequest(Resource*, const ResourceRequest&) final; | 177 void updateRequest(Resource*, const ResourceRequest&) final; |
179 void responseReceived(Resource*, const ResourceResponse&, PassOwnPtr<WebData
ConsumerHandle>) final; | 178 void responseReceived(Resource*, const ResourceResponse&, PassOwnPtr<WebData
ConsumerHandle>) final; |
180 void dataReceived(Resource*, const char* data, unsigned length) final; | 179 void dataReceived(Resource*, const char* data, unsigned length) final; |
181 void processData(const char* data, unsigned length); | |
182 void notifyFinished(Resource*) final; | 180 void notifyFinished(Resource*) final; |
183 | 181 |
184 bool maybeLoadEmpty(); | 182 bool maybeLoadEmpty(); |
185 | 183 |
186 bool isRedirectAfterPost(const ResourceRequest&, const ResourceResponse&); | 184 bool isRedirectAfterPost(const ResourceRequest&, const ResourceResponse&); |
187 | 185 |
188 bool shouldContinueForResponse() const; | 186 bool shouldContinueForResponse() const; |
189 | 187 |
190 RawPtrWillBeMember<LocalFrame> m_frame; | 188 RawPtrWillBeMember<LocalFrame> m_frame; |
191 PersistentWillBeMember<ResourceFetcher> m_fetcher; | 189 PersistentWillBeMember<ResourceFetcher> m_fetcher; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 InitialScrollState m_initialScrollState; | 226 InitialScrollState m_initialScrollState; |
229 | 227 |
230 enum State { | 228 enum State { |
231 NotStarted, | 229 NotStarted, |
232 Provisional, | 230 Provisional, |
233 Committed, | 231 Committed, |
234 DataReceived, | 232 DataReceived, |
235 MainResourceDone | 233 MainResourceDone |
236 }; | 234 }; |
237 State m_state; | 235 State m_state; |
238 | |
239 // Used to protect against reentrancy into dataReceived(). | |
240 bool m_inDataReceived; | |
241 RefPtr<SharedBuffer> m_dataBuffer; | |
242 }; | 236 }; |
243 | 237 |
244 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 238 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
245 | 239 |
246 } // namespace blink | 240 } // namespace blink |
247 | 241 |
248 #endif // DocumentLoader_h | 242 #endif // DocumentLoader_h |
OLD | NEW |