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 "content/common/image_downloader/image_downloader.mojom.h" | 8 #include "content/common/image_downloader/image_downloader.mojom.h" |
9 #include "content/renderer/image_downloader/image_downloader_base.h" | 9 #include "content/renderer/image_downloader/image_downloader_base.h" |
10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
11 | 11 |
| 12 namespace service_manager { |
| 13 struct BindSourceInfo; |
| 14 } |
| 15 |
12 namespace content { | 16 namespace content { |
13 | 17 |
14 class ImageDownloaderImpl : public mojom::ImageDownloader, | 18 class ImageDownloaderImpl : public mojom::ImageDownloader, |
15 public ImageDownloaderBase { | 19 public ImageDownloaderBase { |
16 public: | 20 public: |
17 ~ImageDownloaderImpl() override; | 21 ~ImageDownloaderImpl() override; |
18 | 22 |
19 static void CreateMojoService(RenderFrame* render_frame, | 23 static void CreateMojoService( |
20 mojom::ImageDownloaderRequest request); | 24 RenderFrame* render_frame, |
| 25 const service_manager::BindSourceInfo& source_info, |
| 26 mojom::ImageDownloaderRequest request); |
21 | 27 |
22 private: | 28 private: |
23 ImageDownloaderImpl(RenderFrame* render_frame, | 29 ImageDownloaderImpl(RenderFrame* render_frame, |
24 mojom::ImageDownloaderRequest request); | 30 mojom::ImageDownloaderRequest request); |
25 | 31 |
26 // Override ImageDownloaderBase::OnDestruct(). | 32 // Override ImageDownloaderBase::OnDestruct(). |
27 void OnDestruct() override; | 33 void OnDestruct() override; |
28 | 34 |
29 // ImageDownloader implementation. | 35 // ImageDownloader implementation. |
30 void DownloadImage(const GURL& url, | 36 void DownloadImage(const GURL& url, |
(...skipping 13 matching lines...) Expand all Loading... |
44 const std::vector<SkBitmap>& images); | 50 const std::vector<SkBitmap>& images); |
45 | 51 |
46 mojo::Binding<mojom::ImageDownloader> binding_; | 52 mojo::Binding<mojom::ImageDownloader> binding_; |
47 | 53 |
48 DISALLOW_COPY_AND_ASSIGN(ImageDownloaderImpl); | 54 DISALLOW_COPY_AND_ASSIGN(ImageDownloaderImpl); |
49 }; | 55 }; |
50 | 56 |
51 } // namespace content | 57 } // namespace content |
52 | 58 |
53 #endif // CONTENT_RENDERER_IMAGE_DOWNLOADER_IMAGE_DOWNLOADER_IMPL_H_ | 59 #endif // CONTENT_RENDERER_IMAGE_DOWNLOADER_IMAGE_DOWNLOADER_IMPL_H_ |
OLD | NEW |