| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/image_downloader/image_downloader_impl.h" | 5 #include "content/renderer/image_downloader/image_downloader_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 image_fetchers_.weak_erase(iter); | 217 image_fetchers_.weak_erase(iter); |
| 218 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, fetcher); | 218 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, fetcher); |
| 219 } | 219 } |
| 220 } | 220 } |
| 221 | 221 |
| 222 void ImageDownloaderImpl::ReplyDownloadResult( | 222 void ImageDownloaderImpl::ReplyDownloadResult( |
| 223 int32_t http_status_code, | 223 int32_t http_status_code, |
| 224 const std::vector<SkBitmap>& result_images, | 224 const std::vector<SkBitmap>& result_images, |
| 225 const std::vector<gfx::Size>& result_original_image_sizes, | 225 const std::vector<gfx::Size>& result_original_image_sizes, |
| 226 const DownloadImageCallback& callback) { | 226 const DownloadImageCallback& callback) { |
| 227 callback.Run(http_status_code, mojo::Array<SkBitmap>::From(result_images), | 227 callback.Run(http_status_code, result_images, result_original_image_sizes); |
| 228 result_original_image_sizes); | |
| 229 } | 228 } |
| 230 | 229 |
| 231 void ImageDownloaderImpl::OnDestruct() { | 230 void ImageDownloaderImpl::OnDestruct() { |
| 232 delete this; | 231 delete this; |
| 233 } | 232 } |
| 234 | 233 |
| 235 } // namespace content | 234 } // namespace content |
| OLD | NEW |