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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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" | 45 #include "platform/SharedBuffer.h" |
46 #include "platform/network/ResourceError.h" | 46 #include "platform/network/ResourceError.h" |
47 #include "platform/network/ResourceRequest.h" | 47 #include "platform/network/ResourceRequest.h" |
48 #include "platform/network/ResourceResponse.h" | 48 #include "platform/network/ResourceResponse.h" |
49 #include "public/platform/WebLoadingBehaviorFlag.h" | 49 #include "public/platform/WebLoadingBehaviorFlag.h" |
50 #include "wtf/HashSet.h" | 50 #include "wtf/HashSet.h" |
51 #include "wtf/RefPtr.h" | 51 #include "wtf/RefPtr.h" |
| 52 #include <memory> |
52 | 53 |
53 namespace blink { | 54 namespace blink { |
54 | 55 |
55 class ApplicationCacheHost; | 56 class ApplicationCacheHost; |
56 class ResourceFetcher; | 57 class ResourceFetcher; |
57 class DocumentInit; | 58 class DocumentInit; |
58 class LocalFrame; | 59 class LocalFrame; |
59 class FrameLoader; | 60 class FrameLoader; |
60 class ResourceLoader; | 61 class ResourceLoader; |
61 class WebDocumentSubresourceFilter; | 62 class WebDocumentSubresourceFilter; |
(...skipping 15 matching lines...) Expand all Loading... |
77 void replaceDocumentWhileExecutingJavaScriptURL(const DocumentInit&, const S
tring& source); | 78 void replaceDocumentWhileExecutingJavaScriptURL(const DocumentInit&, const S
tring& source); |
78 | 79 |
79 const AtomicString& mimeType() const; | 80 const AtomicString& mimeType() const; |
80 | 81 |
81 const ResourceRequest& originalRequest() const; | 82 const ResourceRequest& originalRequest() const; |
82 | 83 |
83 const ResourceRequest& request() const; | 84 const ResourceRequest& request() const; |
84 | 85 |
85 ResourceFetcher* fetcher() const { return m_fetcher.get(); } | 86 ResourceFetcher* fetcher() const { return m_fetcher.get(); } |
86 | 87 |
87 void setSubresourceFilter(PassOwnPtr<WebDocumentSubresourceFilter>); | 88 void setSubresourceFilter(std::unique_ptr<WebDocumentSubresourceFilter>); |
88 WebDocumentSubresourceFilter* subresourceFilter() const { return m_subresour
ceFilter.get(); } | 89 WebDocumentSubresourceFilter* subresourceFilter() const { return m_subresour
ceFilter.get(); } |
89 | 90 |
90 const SubstituteData& substituteData() const { return m_substituteData; } | 91 const SubstituteData& substituteData() const { return m_substituteData; } |
91 | 92 |
92 const KURL& url() const; | 93 const KURL& url() const; |
93 const KURL& unreachableURL() const; | 94 const KURL& unreachableURL() const; |
94 const KURL& urlForHistory() const; | 95 const KURL& urlForHistory() const; |
95 | 96 |
96 const AtomicString& responseMIMEType() const; | 97 const AtomicString& responseMIMEType() const; |
97 | 98 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 void commitIfReady(); | 164 void commitIfReady(); |
164 void commitData(const char* bytes, size_t length); | 165 void commitData(const char* bytes, size_t length); |
165 ResourceLoader* mainResourceLoader() const; | 166 ResourceLoader* mainResourceLoader() const; |
166 void clearMainResourceHandle(); | 167 void clearMainResourceHandle(); |
167 | 168 |
168 bool maybeCreateArchive(); | 169 bool maybeCreateArchive(); |
169 | 170 |
170 void finishedLoading(double finishTime); | 171 void finishedLoading(double finishTime); |
171 void cancelLoadAfterXFrameOptionsOrCSPDenied(const ResourceResponse&); | 172 void cancelLoadAfterXFrameOptionsOrCSPDenied(const ResourceResponse&); |
172 void redirectReceived(Resource*, ResourceRequest&, const ResourceResponse&)
final; | 173 void redirectReceived(Resource*, ResourceRequest&, const ResourceResponse&)
final; |
173 void responseReceived(Resource*, const ResourceResponse&, PassOwnPtr<WebData
ConsumerHandle>) final; | 174 void responseReceived(Resource*, const ResourceResponse&, std::unique_ptr<We
bDataConsumerHandle>) final; |
174 void dataReceived(Resource*, const char* data, size_t length) final; | 175 void dataReceived(Resource*, const char* data, size_t length) final; |
175 void processData(const char* data, size_t length); | 176 void processData(const char* data, size_t length); |
176 void notifyFinished(Resource*) final; | 177 void notifyFinished(Resource*) final; |
177 String debugName() const override { return "DocumentLoader"; } | 178 String debugName() const override { return "DocumentLoader"; } |
178 | 179 |
179 bool maybeLoadEmpty(); | 180 bool maybeLoadEmpty(); |
180 | 181 |
181 bool isRedirectAfterPost(const ResourceRequest&, const ResourceResponse&); | 182 bool isRedirectAfterPost(const ResourceRequest&, const ResourceResponse&); |
182 | 183 |
183 bool shouldContinueForResponse() const; | 184 bool shouldContinueForResponse() const; |
184 | 185 |
185 Member<LocalFrame> m_frame; | 186 Member<LocalFrame> m_frame; |
186 Member<ResourceFetcher> m_fetcher; | 187 Member<ResourceFetcher> m_fetcher; |
187 OwnPtr<WebDocumentSubresourceFilter> m_subresourceFilter; | 188 std::unique_ptr<WebDocumentSubresourceFilter> m_subresourceFilter; |
188 | 189 |
189 Member<RawResource> m_mainResource; | 190 Member<RawResource> m_mainResource; |
190 | 191 |
191 Member<DocumentWriter> m_writer; | 192 Member<DocumentWriter> m_writer; |
192 | 193 |
193 // A reference to actual request used to create the data source. | 194 // A reference to actual request used to create the data source. |
194 // The only part of this request that should change is the url, and | 195 // The only part of this request that should change is the url, and |
195 // that only in the case of a same-document navigation. | 196 // that only in the case of a same-document navigation. |
196 ResourceRequest m_originalRequest; | 197 ResourceRequest m_originalRequest; |
197 | 198 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 // Used to protect against reentrancy into dataReceived(). | 235 // Used to protect against reentrancy into dataReceived(). |
235 bool m_inDataReceived; | 236 bool m_inDataReceived; |
236 RefPtr<SharedBuffer> m_dataBuffer; | 237 RefPtr<SharedBuffer> m_dataBuffer; |
237 }; | 238 }; |
238 | 239 |
239 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 240 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
240 | 241 |
241 } // namespace blink | 242 } // namespace blink |
242 | 243 |
243 #endif // DocumentLoader_h | 244 #endif // DocumentLoader_h |
OLD | NEW |