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

Unified Diff: chrome/browser/search/suggestions/image_fetcher_impl.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/search/suggestions/image_fetcher_impl.h
diff --git a/chrome/browser/search/suggestions/image_fetcher_impl.h b/chrome/browser/search/suggestions/image_fetcher_impl.h
index 74c9112cb0a0dad86319c8701566e383e706c547..c60347905155b4948edca991a9073444c2d1f7a3 100644
--- a/chrome/browser/search/suggestions/image_fetcher_impl.h
+++ b/chrome/browser/search/suggestions/image_fetcher_impl.h
@@ -13,17 +13,20 @@
#include "base/macros.h"
#include "chrome/browser/bitmap_fetcher/bitmap_fetcher.h"
#include "components/image_fetcher/image_fetcher.h"
-#include "ui/gfx/image/image_skia.h"
#include "url/gurl.h"
+namespace gfx {
+class Image;
+}
+
namespace net {
class URLRequestContextGetter;
}
+
Marc Treib 2016/05/13 15:53:59 nit: remove the extra empty line
markusheintz_ 2016/05/17 13:08:22 Done.
namespace suggestions {
-// A class used to fetch server images. It can be called from any thread and the
-// callback will be called on the thread which initiated the fetch.
+// ImageFetcher implementation.
Marc Treib 2016/05/13 15:53:59 nit: I'd specify "image_fetcher::ImageFetcher"
markusheintz_ 2016/05/17 13:08:22 Done.
class ImageFetcherImpl : public image_fetcher::ImageFetcher,
public chrome::BitmapFetcherDelegate {
public:
@@ -36,13 +39,13 @@ class ImageFetcherImpl : public image_fetcher::ImageFetcher,
void StartOrQueueNetworkRequest(
const GURL& url,
const GURL& image_url,
- base::Callback<void(const GURL&, const SkBitmap*)> callback) override;
+ base::Callback<void(const GURL&, const gfx::Image&)> callback) override;
private:
// Inherited from BitmapFetcherDelegate.
void OnFetchComplete(const GURL& image_url, const SkBitmap* bitmap) override;
- typedef std::vector<base::Callback<void(const GURL&, const SkBitmap*)> >
+ typedef std::vector<base::Callback<void(const GURL&, const gfx::Image&)> >
CallbackVector;
// State related to an image fetch (associated website url, image_url,

Powered by Google App Engine
This is Rietveld 408576698