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

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: Sync again 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.
19 class ImageFetcher { 21 class ImageFetcher {
20 public: 22 public:
21 ImageFetcher() {} 23 ImageFetcher() {}
22 virtual ~ImageFetcher() {} 24 virtual ~ImageFetcher() {}
23 25
24 virtual void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) = 0; 26 virtual void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) = 0;
25 27
28 // An empty gfx::Image will be returned to the callback in case the image
29 // could not be fetched.
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
« no previous file with comments | « chrome/browser/search/thumbnail_source.cc ('k') | components/image_fetcher/image_fetcher_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698