Chromium Code Reviews| Index: content/browser/image_downloader/image_downloader_dispatcher.h |
| diff --git a/content/browser/image_downloader/image_downloader_dispatcher.h b/content/browser/image_downloader/image_downloader_dispatcher.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1f1de73a9a737f90313a931ba1e6656d8194807c |
| --- /dev/null |
| +++ b/content/browser/image_downloader/image_downloader_dispatcher.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_BROWSER_IMAGE_DOWNLOADER_DISPATCHER_H_ |
| +#define CONTENT_BROWSER_IMAGE_DOWNLOADER_DISPATCHER_H_ |
| + |
| +#include "base/macros.h" |
| +#include "content/common/image_downloader/image_downloader.mojom.h" |
| +#include "content/public/browser/web_contents.h" |
| + |
| +class GURL; |
| + |
| +namespace content { |
| + |
| +class RenderFrameHost; |
| + |
| +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.
|
| + public: |
| + explicit ImageDownloaderDispatcher(RenderFrameHost* render_frame_host); |
| + ~ImageDownloaderDispatcher() override; |
| + |
| + int StartDownload(const GURL& url, |
| + bool is_favicon, |
| + uint32_t max_bitmap_size, |
| + bool bypass_cache, |
| + const WebContents::ImageDownloadCallback& callback); |
| + |
| + private: |
| + // Overidden from mojo::ErrorHandler: |
| + void OnConnectionError() override; |
| + |
| + static int next_image_download_id_; |
| + |
| + RenderFrameHost* render_frame_host_; |
| + image_downloader::ImageDownloaderPtr downloader_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ImageDownloaderDispatcher); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_IMAGE_DOWNLOADER_DISPATCHER_H_ |