Chromium Code Reviews| Index: components/suggestions/image_manager.h |
| diff --git a/components/suggestions/image_manager.h b/components/suggestions/image_manager.h |
| index 518000d57f1c9e32519052e60ccfc2084d5b70ae..bb45f37eb64c420265452f307316d6fafb4ad532 100644 |
| --- a/components/suggestions/image_manager.h |
| +++ b/components/suggestions/image_manager.h |
| @@ -24,6 +24,10 @@ |
| #include "ui/gfx/image/image_skia.h" |
|
Marc Treib
2016/05/20 14:40:04
Not your doing, but is this include needed?
markusheintz_
2016/05/23 13:20:47
Replaced with an include for SkBitmap
This requir
Marc Treib
2016/05/23 13:44:03
Ah, okay. If this requires extra approvals for the
markusheintz_
2016/05/24 08:32:31
Done.
|
| #include "url/gurl.h" |
| +namespace gfx { |
| +class Image; |
| +} |
| + |
| namespace image_fetcher { |
| class ImageFetcher; |
| } |
| @@ -58,7 +62,7 @@ class ImageManager : public image_fetcher::ImageFetcherDelegate { |
| // Should be called from the UI thread. |
| virtual void GetImageForURL( |
| const GURL& url, |
| - base::Callback<void(const GURL&, const SkBitmap*)> callback); |
| + base::Callback<void(const GURL&, const gfx::Image&)> callback); |
| protected: |
| // Methods inherited from image_fetcher::ImageFetcherDelegate |
| @@ -78,7 +82,7 @@ class ImageManager : public image_fetcher::ImageFetcherDelegate { |
| // Used for testing. |
| ImageManager(); |
| - typedef std::vector<base::Callback<void(const GURL&, const SkBitmap*)> > |
| + typedef std::vector<base::Callback<void(const GURL&, const gfx::Image&)> > |
| CallbackVector; |
| typedef base::hash_map<std::string, scoped_refptr<base::RefCountedMemory>> |
| ImageMap; |
| @@ -105,16 +109,16 @@ class ImageManager : public image_fetcher::ImageFetcherDelegate { |
| void QueueCacheRequest( |
| const GURL& url, const GURL& image_url, |
| - base::Callback<void(const GURL&, const SkBitmap*)> callback); |
| + base::Callback<void(const GURL&, const gfx::Image&)> callback); |
|
noyau (Ping after 24h)
2016/05/20 15:15:59
You are using this callback type in 4 places just
markusheintz_
2016/05/23 13:20:47
Done
|
| void ServeFromCacheOrNetwork( |
| const GURL& url, const GURL& image_url, |
| - base::Callback<void(const GURL&, const SkBitmap*)> callback); |
| + base::Callback<void(const GURL&, const gfx::Image&)> callback); |
| void OnCacheImageDecoded( |
| const GURL& url, |
| const GURL& image_url, |
| - base::Callback<void(const GURL&, const SkBitmap*)> callback, |
| + const base::Callback<void(const GURL&, const gfx::Image&)>& callback, |
| std::unique_ptr<SkBitmap> bitmap); |
| // Returns null if the |url| had no entry in the cache. |