OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. |
3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) | 3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) |
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 m_request = m_deferredRequest; | 163 m_request = m_deferredRequest; |
164 m_deferredRequest = ResourceRequest(); | 164 m_deferredRequest = ResourceRequest(); |
165 start(); | 165 start(); |
166 } | 166 } |
167 } | 167 } |
168 | 168 |
169 void ResourceLoader::didDownloadData(WebKit::WebURLLoader*, int length, int enco
dedDataLength) | 169 void ResourceLoader::didDownloadData(WebKit::WebURLLoader*, int length, int enco
dedDataLength) |
170 { | 170 { |
171 RefPtr<ResourceLoader> protect(this); | 171 RefPtr<ResourceLoader> protect(this); |
172 RELEASE_ASSERT(m_connectionState == ConnectionStateReceivedResponse); | 172 RELEASE_ASSERT(m_connectionState == ConnectionStateReceivedResponse); |
| 173 m_host->didDownloadData(m_resource, length, encodedDataLength, m_options); |
173 m_resource->didDownloadData(length); | 174 m_resource->didDownloadData(length); |
174 } | 175 } |
175 | 176 |
176 void ResourceLoader::didFinishLoadingOnePart(double finishTime) | 177 void ResourceLoader::didFinishLoadingOnePart(double finishTime) |
177 { | 178 { |
178 // If load has been cancelled after finishing (which could happen with a | 179 // If load has been cancelled after finishing (which could happen with a |
179 // JavaScript that changes the window location), do nothing. | 180 // JavaScript that changes the window location), do nothing. |
180 if (m_state == Terminated) | 181 if (m_state == Terminated) |
181 return; | 182 return; |
182 | 183 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 return; | 413 return; |
413 } | 414 } |
414 didReceiveResponse(0, responseOut); | 415 didReceiveResponse(0, responseOut); |
415 RefPtr<ResourceLoadInfo> resourceLoadInfo = responseOut.toResourceResponse()
.resourceLoadInfo(); | 416 RefPtr<ResourceLoadInfo> resourceLoadInfo = responseOut.toResourceResponse()
.resourceLoadInfo(); |
416 m_host->didReceiveData(m_resource, dataOut.data(), dataOut.size(), resourceL
oadInfo ? resourceLoadInfo->encodedDataLength : -1, m_options); | 417 m_host->didReceiveData(m_resource, dataOut.data(), dataOut.size(), resourceL
oadInfo ? resourceLoadInfo->encodedDataLength : -1, m_options); |
417 m_resource->setResourceBuffer(dataOut); | 418 m_resource->setResourceBuffer(dataOut); |
418 didFinishLoading(0, responseOut.responseTime()); | 419 didFinishLoading(0, responseOut.responseTime()); |
419 } | 420 } |
420 | 421 |
421 } | 422 } |
OLD | NEW |