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 #ifndef CONTENT_RENDERER_IMAGE_DOWNLOADER_IMAGE_DOWNLOADER_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_IMAGE_DOWNLOADER_IMAGE_DOWNLOADER_IMPL_H_ |
6 #define CONTENT_RENDERER_IMAGE_DOWNLOADER_IMAGE_DOWNLOADER_IMPL_H_ | 6 #define CONTENT_RENDERER_IMAGE_DOWNLOADER_IMAGE_DOWNLOADER_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // succesfully or with a failure. See FetchImage for more | 63 // succesfully or with a failure. See FetchImage for more |
64 // details. | 64 // details. |
65 void DidFetchImage(uint32_t max_image_size, | 65 void DidFetchImage(uint32_t max_image_size, |
66 const DownloadImageCallback& callback, | 66 const DownloadImageCallback& callback, |
67 MultiResolutionImageResourceFetcher* fetcher, | 67 MultiResolutionImageResourceFetcher* fetcher, |
68 const std::vector<SkBitmap>& images); | 68 const std::vector<SkBitmap>& images); |
69 | 69 |
70 // Reply download result | 70 // Reply download result |
71 void ReplyDownloadResult( | 71 void ReplyDownloadResult( |
72 int32_t http_status_code, | 72 int32_t http_status_code, |
73 const std::vector<SkBitmap>& result_images, | 73 std::vector<SkBitmap>* result_images, |
74 const std::vector<gfx::Size>& result_original_image_sizes, | 74 const std::vector<gfx::Size>& result_original_image_sizes, |
75 const DownloadImageCallback& callback); | 75 const DownloadImageCallback& callback); |
76 | 76 |
77 // We use StrongBinding to ensure deletion of "this" when connection closed | 77 // We use StrongBinding to ensure deletion of "this" when connection closed |
78 mojo::StrongBinding<ImageDownloader> binding_; | 78 mojo::StrongBinding<ImageDownloader> binding_; |
79 | 79 |
80 typedef ScopedVector<MultiResolutionImageResourceFetcher> | 80 typedef ScopedVector<MultiResolutionImageResourceFetcher> |
81 ImageResourceFetcherList; | 81 ImageResourceFetcherList; |
82 | 82 |
83 // ImageResourceFetchers schedule via FetchImage. | 83 // ImageResourceFetchers schedule via FetchImage. |
84 ImageResourceFetcherList image_fetchers_; | 84 ImageResourceFetcherList image_fetchers_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(ImageDownloaderImpl); | 86 DISALLOW_COPY_AND_ASSIGN(ImageDownloaderImpl); |
87 }; | 87 }; |
88 | 88 |
89 } // namespace content | 89 } // namespace content |
90 | 90 |
91 #endif // CONTENT_RENDERER_IMAGE_DOWNLOADER_IMAGE_DOWNLOADER_IMPL_H_ | 91 #endif // CONTENT_RENDERER_IMAGE_DOWNLOADER_IMAGE_DOWNLOADER_IMPL_H_ |
OLD | NEW |