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

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: 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 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..9cf508334c862e10ca341937046d0e43299f215c 100644
--- a/chrome/browser/search/suggestions/image_fetcher_impl.h
+++ b/chrome/browser/search/suggestions/image_fetcher_impl.h
@@ -13,17 +13,19 @@
#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;
}
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.
+// image_fetcher::ImageFetcher implementation.
class ImageFetcherImpl : public image_fetcher::ImageFetcher,
public chrome::BitmapFetcherDelegate {
public:
@@ -36,13 +38,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,
« no previous file with comments | « chrome/browser/android/ntp/ntp_snippets_bridge.cc ('k') | chrome/browser/search/suggestions/image_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698