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