Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: content/renderer/image_downloader/image_downloader_impl.h

Issue 2824193002: Enable use_once_callback for //content/common/*.mojom (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 13 matching lines...) Expand all
24 mojom::ImageDownloaderRequest request); 24 mojom::ImageDownloaderRequest request);
25 25
26 // Override ImageDownloaderBase::OnDestruct(). 26 // Override ImageDownloaderBase::OnDestruct().
27 void OnDestruct() override; 27 void OnDestruct() override;
28 28
29 // ImageDownloader implementation. 29 // ImageDownloader implementation.
30 void DownloadImage(const GURL& url, 30 void DownloadImage(const GURL& url,
31 bool is_favicon, 31 bool is_favicon,
32 uint32_t max_bitmap_size, 32 uint32_t max_bitmap_size,
33 bool bypass_cache, 33 bool bypass_cache,
34 const DownloadImageCallback& callback) override; 34 DownloadImageCallback callback) override;
35 35
36 // Called when downloading finishes. All frames in |images| whose size <= 36 // Called when downloading finishes. All frames in |images| whose size <=
37 // |max_image_size| will be returned through |callback|. If all of the frames 37 // |max_image_size| will be returned through |callback|. If all of the frames
38 // are larger than |max_image_size|, the smallest frame is resized to 38 // are larger than |max_image_size|, the smallest frame is resized to
39 // |max_image_size| and is the only result. |max_image_size| == 0 is 39 // |max_image_size| and is the only result. |max_image_size| == 0 is
40 // interpreted as no max image size. 40 // interpreted as no max image size.
41 void DidDownloadImage(uint32_t max_bitmap_size, 41 void DidDownloadImage(uint32_t max_bitmap_size,
42 const DownloadImageCallback& callback, 42 DownloadImageCallback callback,
43 int32_t http_status_code, 43 int32_t http_status_code,
44 const std::vector<SkBitmap>& images); 44 const std::vector<SkBitmap>& images);
45 45
46 mojo::Binding<mojom::ImageDownloader> binding_; 46 mojo::Binding<mojom::ImageDownloader> binding_;
47 47
48 DISALLOW_COPY_AND_ASSIGN(ImageDownloaderImpl); 48 DISALLOW_COPY_AND_ASSIGN(ImageDownloaderImpl);
49 }; 49 };
50 50
51 } // namespace content 51 } // namespace content
52 52
53 #endif // CONTENT_RENDERER_IMAGE_DOWNLOADER_IMAGE_DOWNLOADER_IMPL_H_ 53 #endif // CONTENT_RENDERER_IMAGE_DOWNLOADER_IMAGE_DOWNLOADER_IMPL_H_
OLDNEW
« no previous file with comments | « content/public/test/mock_render_thread.cc ('k') | content/renderer/image_downloader/image_downloader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698