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

Side by Side Diff: components/image_fetcher/image_fetcher.h

Issue 1974013002: Replace SkBitmap with gfx::Image in the ImageFetcher API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix iOS build errors. Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_H_ 5 #ifndef COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_H_
6 #define COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_H_ 6 #define COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "components/image_fetcher/image_fetcher_delegate.h" 10 #include "components/image_fetcher/image_fetcher_delegate.h"
11 #include "url/gurl.h" 11 #include "url/gurl.h"
12 12
13 class SkBitmap; 13 namespace gfx {
14 class Image;
15 }
14 16
15 namespace image_fetcher { 17 namespace image_fetcher {
16 18
17 // A class used to fetch server images. It can be called from any thread and the 19 // A class used to fetch server images. It can be called from any thread and the
18 // callback will be called on the thread which initiated the fetch. 20 // callback will be called on the thread which initiated the fetch. An empty
Marc Treib 2016/05/13 15:53:59 nit: I'd move the new comment to StartOrQueueNetwo
markusheintz_ 2016/05/17 13:08:22 Done.
21 // gfx::Image will be returned to the callback in case the image could not be
22 // fetched.
19 class ImageFetcher { 23 class ImageFetcher {
20 public: 24 public:
21 ImageFetcher() {} 25 ImageFetcher() {}
22 virtual ~ImageFetcher() {} 26 virtual ~ImageFetcher() {}
23 27
24 virtual void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) = 0; 28 virtual void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) = 0;
25 29
26 virtual void StartOrQueueNetworkRequest( 30 virtual void StartOrQueueNetworkRequest(
27 const GURL& url, 31 const GURL& url,
28 const GURL& image_url, 32 const GURL& image_url,
29 base::Callback<void(const GURL&, const SkBitmap*)> callback) = 0; 33 base::Callback<void(const GURL&, const gfx::Image&)> callback) = 0;
30 34
31 private: 35 private:
32 DISALLOW_COPY_AND_ASSIGN(ImageFetcher); 36 DISALLOW_COPY_AND_ASSIGN(ImageFetcher);
33 }; 37 };
34 38
35 } // namespace image_fetcher 39 } // namespace image_fetcher
36 40
37 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_H_ 41 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698