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

Side by Side Diff: components/image_fetcher/image_fetcher_delegate.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
« no previous file with comments | « components/image_fetcher/image_fetcher.h ('k') | components/ntp_snippets/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_DELEGATE_H_ 5 #ifndef COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_
6 #define COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_ 6 #define COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 class GURL; 10 class GURL;
11 class SkBitmap; 11
12 namespace gfx {
13 class Image;
14 }
12 15
13 namespace image_fetcher { 16 namespace image_fetcher {
14 17
15 class ImageFetcherDelegate { 18 class ImageFetcherDelegate {
16 public: 19 public:
17 ImageFetcherDelegate() {} 20 ImageFetcherDelegate() {}
18 21
19 // Called when an image was fetched. |url| represents the website for which 22 // Called when an image was fetched. |url| represents the website for which
20 // the image was fetched. |bitmap| stores image data owned by the caller, and 23 // the image was fetched. |image| stores image data owned by the caller, and
21 // can be nullptr. 24 // can be an empty gfx::Image.
22 virtual void OnImageFetched(const GURL& url, const SkBitmap* bitmap) = 0; 25 virtual void OnImageFetched(const GURL& url, const gfx::Image& image) = 0;
23 26
24 protected: 27 protected:
25 virtual ~ImageFetcherDelegate() {} 28 virtual ~ImageFetcherDelegate() {}
26 29
27 DISALLOW_COPY_AND_ASSIGN(ImageFetcherDelegate); 30 DISALLOW_COPY_AND_ASSIGN(ImageFetcherDelegate);
28 }; 31 };
29 32
30 } // namespace image_fetcher 33 } // namespace image_fetcher
31 34
32 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_ 35 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/image_fetcher/image_fetcher.h ('k') | components/ntp_snippets/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698