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 27 matching lines...) Expand all Loading... |
38 | 38 |
39 // RenderThreadObserver implementation. | 39 // RenderThreadObserver implementation. |
40 void OnRenderProcessShutdown() override; | 40 void OnRenderProcessShutdown() override; |
41 | 41 |
42 private: | 42 private: |
43 ImageDownloaderImpl( | 43 ImageDownloaderImpl( |
44 RenderFrame* render_frame, | 44 RenderFrame* render_frame, |
45 mojo::InterfaceRequest<content::mojom::ImageDownloader> request); | 45 mojo::InterfaceRequest<content::mojom::ImageDownloader> request); |
46 ~ImageDownloaderImpl() override; | 46 ~ImageDownloaderImpl() override; |
47 | 47 |
| 48 // RenderFrameObserver implementation. |
| 49 void OnDestruct() override; |
| 50 |
48 // ImageDownloader methods: | 51 // ImageDownloader methods: |
49 void DownloadImage(const mojo::String& url, | 52 void DownloadImage(const mojo::String& url, |
50 bool is_favicon, | 53 bool is_favicon, |
51 uint32_t max_bitmap_size, | 54 uint32_t max_bitmap_size, |
52 bool bypass_cache, | 55 bool bypass_cache, |
53 const DownloadImageCallback& callback) override; | 56 const DownloadImageCallback& callback) override; |
54 | 57 |
55 // Requests to fetch an image. When done, the ImageDownloaderImpl | 58 // Requests to fetch an image. When done, the ImageDownloaderImpl |
56 // is notified by way of DidFetchImage. Returns true if the | 59 // is notified by way of DidFetchImage. Returns true if the |
57 // request was successfully started, false otherwise. | 60 // request was successfully started, false otherwise. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 93 |
91 // ImageResourceFetchers schedule via FetchImage. | 94 // ImageResourceFetchers schedule via FetchImage. |
92 ImageResourceFetcherList image_fetchers_; | 95 ImageResourceFetcherList image_fetchers_; |
93 | 96 |
94 DISALLOW_COPY_AND_ASSIGN(ImageDownloaderImpl); | 97 DISALLOW_COPY_AND_ASSIGN(ImageDownloaderImpl); |
95 }; | 98 }; |
96 | 99 |
97 } // namespace content | 100 } // namespace content |
98 | 101 |
99 #endif // CONTENT_RENDERER_IMAGE_DOWNLOADER_IMAGE_DOWNLOADER_IMPL_H_ | 102 #endif // CONTENT_RENDERER_IMAGE_DOWNLOADER_IMAGE_DOWNLOADER_IMPL_H_ |
OLD | NEW |