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