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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 m_request = m_deferredRequest; | 175 m_request = m_deferredRequest; |
176 m_deferredRequest = ResourceRequest(); | 176 m_deferredRequest = ResourceRequest(); |
177 start(); | 177 start(); |
178 } | 178 } |
179 } | 179 } |
180 | 180 |
181 void ResourceLoader::didDownloadData(blink::WebURLLoader*, int length, int encod
edDataLength) | 181 void ResourceLoader::didDownloadData(blink::WebURLLoader*, int length, int encod
edDataLength) |
182 { | 182 { |
183 RefPtr<ResourceLoader> protect(this); | 183 RefPtr<ResourceLoader> protect(this); |
184 RELEASE_ASSERT(m_connectionState == ConnectionStateReceivedResponse); | 184 RELEASE_ASSERT(m_connectionState == ConnectionStateReceivedResponse); |
| 185 m_host->didDownloadData(m_resource, length, encodedDataLength, m_options); |
185 m_resource->didDownloadData(length); | 186 m_resource->didDownloadData(length); |
186 } | 187 } |
187 | 188 |
188 void ResourceLoader::didFinishLoadingOnePart(double finishTime) | 189 void ResourceLoader::didFinishLoadingOnePart(double finishTime) |
189 { | 190 { |
190 // If load has been cancelled after finishing (which could happen with a | 191 // If load has been cancelled after finishing (which could happen with a |
191 // JavaScript that changes the window location), do nothing. | 192 // JavaScript that changes the window location), do nothing. |
192 if (m_state == Terminated) | 193 if (m_state == Terminated) |
193 return; | 194 return; |
194 | 195 |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 didReceiveResponse(0, responseOut); | 431 didReceiveResponse(0, responseOut); |
431 if (m_state == Terminated) | 432 if (m_state == Terminated) |
432 return; | 433 return; |
433 RefPtr<ResourceLoadInfo> resourceLoadInfo = responseOut.toResourceResponse()
.resourceLoadInfo(); | 434 RefPtr<ResourceLoadInfo> resourceLoadInfo = responseOut.toResourceResponse()
.resourceLoadInfo(); |
434 m_host->didReceiveData(m_resource, dataOut.data(), dataOut.size(), resourceL
oadInfo ? resourceLoadInfo->encodedDataLength : -1, m_options); | 435 m_host->didReceiveData(m_resource, dataOut.data(), dataOut.size(), resourceL
oadInfo ? resourceLoadInfo->encodedDataLength : -1, m_options); |
435 m_resource->setResourceBuffer(dataOut); | 436 m_resource->setResourceBuffer(dataOut); |
436 didFinishLoading(0, monotonicallyIncreasingTime()); | 437 didFinishLoading(0, monotonicallyIncreasingTime()); |
437 } | 438 } |
438 | 439 |
439 } | 440 } |
OLD | NEW |