| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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); | 185 m_host->didDownloadData(m_resource, length, encodedDataLength); |
| 186 m_resource->didDownloadData(length); | 186 m_resource->didDownloadData(length); |
| 187 } | 187 } |
| 188 | 188 |
| 189 void ResourceLoader::didRequestStartForFrame(blink::WebURLLoader*) |
| 190 { |
| 191 m_host->didRequestStartForFrame(); |
| 192 } |
| 193 |
| 189 void ResourceLoader::didFinishLoadingOnePart(double finishTime) | 194 void ResourceLoader::didFinishLoadingOnePart(double finishTime) |
| 190 { | 195 { |
| 191 // If load has been cancelled after finishing (which could happen with a | 196 // If load has been cancelled after finishing (which could happen with a |
| 192 // JavaScript that changes the window location), do nothing. | 197 // JavaScript that changes the window location), do nothing. |
| 193 if (m_state == Terminated) | 198 if (m_state == Terminated) |
| 194 return; | 199 return; |
| 195 | 200 |
| 196 if (m_notifiedLoadComplete) | 201 if (m_notifiedLoadComplete) |
| 197 return; | 202 return; |
| 198 m_notifiedLoadComplete = true; | 203 m_notifiedLoadComplete = true; |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 didReceiveResponse(0, responseOut); | 436 didReceiveResponse(0, responseOut); |
| 432 if (m_state == Terminated) | 437 if (m_state == Terminated) |
| 433 return; | 438 return; |
| 434 RefPtr<ResourceLoadInfo> resourceLoadInfo = responseOut.toResourceResponse()
.resourceLoadInfo(); | 439 RefPtr<ResourceLoadInfo> resourceLoadInfo = responseOut.toResourceResponse()
.resourceLoadInfo(); |
| 435 m_host->didReceiveData(m_resource, dataOut.data(), dataOut.size(), resourceL
oadInfo ? resourceLoadInfo->encodedDataLength : -1); | 440 m_host->didReceiveData(m_resource, dataOut.data(), dataOut.size(), resourceL
oadInfo ? resourceLoadInfo->encodedDataLength : -1); |
| 436 m_resource->setResourceBuffer(dataOut); | 441 m_resource->setResourceBuffer(dataOut); |
| 437 didFinishLoading(0, monotonicallyIncreasingTime()); | 442 didFinishLoading(0, monotonicallyIncreasingTime()); |
| 438 } | 443 } |
| 439 | 444 |
| 440 } | 445 } |
| OLD | NEW |