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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 133 |
134 KURL urlForHistory() const; | 134 KURL urlForHistory() const; |
135 | 135 |
136 void setDefersLoading(bool); | 136 void setDefersLoading(bool); |
137 void setMainResourceDataBufferingPolicy(DataBufferingPolicy); | 137 void setMainResourceDataBufferingPolicy(DataBufferingPolicy); |
138 | 138 |
139 void startLoadingMainResource(); | 139 void startLoadingMainResource(); |
140 void cancelMainResourceLoad(const ResourceError&); | 140 void cancelMainResourceLoad(const ResourceError&); |
141 | 141 |
142 bool isLoadingMainResource() const { return m_loadingMainResource; } | 142 bool isLoadingMainResource() const { return m_loadingMainResource; } |
143 bool isLoadingMultipartContent() const { return m_isLoadingMultipartCont
ent; } | |
144 | 143 |
145 void stopLoadingSubresources(); | 144 void stopLoadingSubresources(); |
146 void addResourceLoader(ResourceLoader*); | 145 void addResourceLoader(ResourceLoader*); |
147 void removeResourceLoader(ResourceLoader*); | 146 void removeResourceLoader(ResourceLoader*); |
148 | 147 |
149 void subresourceLoaderFinishedLoadingOnePart(ResourceLoader*); | 148 void subresourceLoaderFinishedLoadingOnePart(ResourceLoader*); |
150 | 149 |
151 void setDeferMainResourceDataLoad(bool defer) { m_deferMainResourceDataL
oad = defer; } | 150 void setDeferMainResourceDataLoad(bool defer) { m_deferMainResourceDataL
oad = defer; } |
152 | 151 |
153 DocumentLoadTiming* timing() { return &m_documentLoadTiming; } | 152 DocumentLoadTiming* timing() { return &m_documentLoadTiming; } |
(...skipping 20 matching lines...) Expand all Loading... |
174 Document* document() const; | 173 Document* document() const; |
175 | 174 |
176 void setRequest(const ResourceRequest&); | 175 void setRequest(const ResourceRequest&); |
177 | 176 |
178 void commitIfReady(); | 177 void commitIfReady(); |
179 void setMainDocumentError(const ResourceError&); | 178 void setMainDocumentError(const ResourceError&); |
180 void commitLoad(const char*, int); | 179 void commitLoad(const char*, int); |
181 void clearMainResourceLoader(); | 180 void clearMainResourceLoader(); |
182 ResourceLoader* mainResourceLoader() const; | 181 ResourceLoader* mainResourceLoader() const; |
183 | 182 |
184 void setupForReplace(); | |
185 void maybeFinishLoadingMultipartContent(); | |
186 | |
187 bool maybeCreateArchive(); | 183 bool maybeCreateArchive(); |
188 void clearArchiveResources(); | 184 void clearArchiveResources(); |
189 | 185 |
190 void prepareSubframeArchiveLoadIfNeeded(); | 186 void prepareSubframeArchiveLoadIfNeeded(); |
191 void addAllArchiveResources(MHTMLArchive*); | 187 void addAllArchiveResources(MHTMLArchive*); |
192 | 188 |
193 void willSendRequest(ResourceRequest&, const ResourceResponse&); | 189 void willSendRequest(ResourceRequest&, const ResourceResponse&); |
194 void finishedLoading(double finishTime); | 190 void finishedLoading(double finishTime); |
195 void mainReceivedError(const ResourceError&); | 191 void mainReceivedError(const ResourceError&); |
196 virtual void redirectReceived(CachedResource*, ResourceRequest&, const R
esourceResponse&) OVERRIDE; | 192 virtual void redirectReceived(CachedResource*, ResourceRequest&, const R
esourceResponse&) OVERRIDE; |
197 virtual void responseReceived(CachedResource*, const ResourceResponse&)
OVERRIDE; | 193 virtual void responseReceived(CachedResource*, const ResourceResponse&)
OVERRIDE; |
198 virtual void dataReceived(CachedResource*, const char* data, int length)
OVERRIDE; | 194 virtual void dataReceived(CachedResource*, const char* data, int length)
OVERRIDE; |
199 virtual void notifyFinished(CachedResource*) OVERRIDE; | 195 virtual void notifyFinished(CachedResource*) OVERRIDE; |
200 | 196 |
201 bool maybeLoadEmpty(); | 197 bool maybeLoadEmpty(); |
202 | 198 |
203 bool isMultipartReplacingLoad() const; | |
204 bool isPostOrRedirectAfterPost(const ResourceRequest&, const ResourceRes
ponse&); | 199 bool isPostOrRedirectAfterPost(const ResourceRequest&, const ResourceRes
ponse&); |
205 | 200 |
206 bool shouldContinueForResponse() const; | 201 bool shouldContinueForResponse() const; |
207 void stopLoadingForPolicyChange(); | 202 void stopLoadingForPolicyChange(); |
208 ResourceError interruptedForPolicyChangeError() const; | 203 ResourceError interruptedForPolicyChangeError() const; |
209 | 204 |
210 typedef Timer<DocumentLoader> DocumentLoaderTimer; | 205 typedef Timer<DocumentLoader> DocumentLoaderTimer; |
211 | 206 |
212 void handleSubstituteDataLoadSoon(); | 207 void handleSubstituteDataLoadSoon(); |
213 void handleSubstituteDataLoadNow(DocumentLoaderTimer*); | 208 void handleSubstituteDataLoadNow(DocumentLoaderTimer*); |
(...skipping 26 matching lines...) Expand all Loading... |
240 ResourceRequest m_request; | 235 ResourceRequest m_request; |
241 | 236 |
242 ResourceResponse m_response; | 237 ResourceResponse m_response; |
243 | 238 |
244 ResourceError m_mainDocumentError; | 239 ResourceError m_mainDocumentError; |
245 | 240 |
246 bool m_committed; | 241 bool m_committed; |
247 bool m_isStopping; | 242 bool m_isStopping; |
248 bool m_gotFirstByte; | 243 bool m_gotFirstByte; |
249 bool m_isClientRedirect; | 244 bool m_isClientRedirect; |
250 bool m_isLoadingMultipartContent; | |
251 | 245 |
252 // FIXME: Document::m_processingLoadEvent and DocumentLoader::m_wasOnloa
dHandled are roughly the same | 246 // FIXME: Document::m_processingLoadEvent and DocumentLoader::m_wasOnloa
dHandled are roughly the same |
253 // and should be merged. | 247 // and should be merged. |
254 bool m_wasOnloadHandled; | 248 bool m_wasOnloadHandled; |
255 | 249 |
256 StringWithDirection m_pageTitle; | 250 StringWithDirection m_pageTitle; |
257 | 251 |
258 String m_overrideEncoding; | 252 String m_overrideEncoding; |
259 | 253 |
260 // The action that triggered loading - we keep this around for the | 254 // The action that triggered loading - we keep this around for the |
(...skipping 10 matching lines...) Expand all Loading... |
271 unsigned long m_identifierForLoadWithoutResourceLoader; | 265 unsigned long m_identifierForLoadWithoutResourceLoader; |
272 | 266 |
273 DocumentLoaderTimer m_dataLoadTimer; | 267 DocumentLoaderTimer m_dataLoadTimer; |
274 | 268 |
275 friend class ApplicationCacheHost; // for substitute resource delivery | 269 friend class ApplicationCacheHost; // for substitute resource delivery |
276 OwnPtr<ApplicationCacheHost> m_applicationCacheHost; | 270 OwnPtr<ApplicationCacheHost> m_applicationCacheHost; |
277 }; | 271 }; |
278 } | 272 } |
279 | 273 |
280 #endif // DocumentLoader_h | 274 #endif // DocumentLoader_h |
OLD | NEW |