OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_BROWSER_IMAGE_DOWNLOADER_DISPATCHER_H_ | |
6 #define CONTENT_BROWSER_IMAGE_DOWNLOADER_DISPATCHER_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "content/common/image_downloader/image_downloader.mojom.h" | |
10 #include "content/public/browser/web_contents.h" | |
11 | |
12 class GURL; | |
13 | |
14 namespace content { | |
15 | |
16 class RenderFrameHost; | |
17 | |
18 class ImageDownloaderDispatcher : public mojo::ErrorHandler { | |
Ken Rockot(use gerrit already)
2015/04/14 16:14:20
nit: Please add a brief comment documenting the pu
leonhsl(Using Gerrit)
2015/04/17 06:14:34
Done.
| |
19 public: | |
20 explicit ImageDownloaderDispatcher(RenderFrameHost* render_frame_host); | |
21 ~ImageDownloaderDispatcher() override; | |
22 | |
23 int StartDownload(const GURL& url, | |
24 bool is_favicon, | |
25 uint32_t max_bitmap_size, | |
26 bool bypass_cache, | |
27 const WebContents::ImageDownloadCallback& callback); | |
28 | |
29 private: | |
30 // Overidden from mojo::ErrorHandler: | |
31 void OnConnectionError() override; | |
32 | |
33 static int next_image_download_id_; | |
34 | |
35 RenderFrameHost* render_frame_host_; | |
36 image_downloader::ImageDownloaderPtr downloader_; | |
37 | |
38 DISALLOW_COPY_AND_ASSIGN(ImageDownloaderDispatcher); | |
39 }; | |
40 | |
41 } // namespace content | |
42 | |
43 #endif // CONTENT_BROWSER_IMAGE_DOWNLOADER_DISPATCHER_H_ | |
OLD | NEW |