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

Unified Diff: components/ntp_tiles/most_visited_sites.h

Issue 2000653002: Replace the usage of SkBitmap with gfx::Image in the suggestion service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: accidental up load. This patchset was not committed with this CL Created 4 years, 6 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
« no previous file with comments | « components/ntp_tiles/DEPS ('k') | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_tiles/most_visited_sites.h
diff --git a/components/ntp_tiles/most_visited_sites.h b/components/ntp_tiles/most_visited_sites.h
index 18e3d6fe1748db20468264f8ba4097c5f65e6502..24bd5a30b430a66f6a0c3f3030808215c13eed8e 100644
--- a/components/ntp_tiles/most_visited_sites.h
+++ b/components/ntp_tiles/most_visited_sites.h
@@ -18,6 +18,7 @@
#include "base/scoped_observer.h"
#include "components/history/core/browser/history_types.h"
#include "components/history/core/browser/top_sites_observer.h"
+#include "components/image_fetcher/image_decoder.h"
#include "components/ntp_tiles/popular_sites.h"
#include "components/suggestions/proto/suggestions.pb.h"
#include "components/suggestions/suggestions_service.h"
@@ -136,7 +137,8 @@ class MostVisitedSites : public history::TopSitesObserver,
const base::FilePath& popular_sites_directory,
scoped_refptr<history::TopSites> top_sites,
suggestions::SuggestionsService* suggestions,
- MostVisitedSitesSupervisor* supervisor);
+ MostVisitedSitesSupervisor* supervisor,
+ image_fetcher::ImageDecoder* image_decoder);
~MostVisitedSites() override;
@@ -144,9 +146,9 @@ class MostVisitedSites : public history::TopSitesObserver,
// must not be null.
void SetMostVisitedURLsObserver(Observer* observer, int num_sites);
+ // TODO(markusheintz): Replace bitmap with gfx::Image()
using ThumbnailCallback = base::Callback<
void(bool /* is_local_thumbnail */, const SkBitmap* /* bitmap */)>;
- void GetURLThumbnail(const GURL& url, const ThumbnailCallback& callback);
void AddOrRemoveBlacklistedUrl(const GURL& url, bool add_url);
void RecordTileTypeMetrics(const std::vector<int>& tile_types);
void RecordOpenedMostVisitedItem(int index, int tile_type);
@@ -213,12 +215,6 @@ class MostVisitedSites : public history::TopSitesObserver,
void OnPopularSitesAvailable(bool success);
- // Runs on the UI Thread.
- void OnLocalThumbnailFetched(
- const GURL& url,
- const ThumbnailCallback& callback,
- std::unique_ptr<SkBitmap> bitmap);
-
// Callback for when the thumbnail lookup is complete.
// Runs on the UI Thread.
void OnObtainedThumbnail(
@@ -246,6 +242,7 @@ class MostVisitedSites : public history::TopSitesObserver,
scoped_refptr<history::TopSites> top_sites_;
suggestions::SuggestionsService* suggestions_service_;
MostVisitedSitesSupervisor* supervisor_;
+ std::unique_ptr<image_fetcher::ImageDecoder> image_decoder_;
Observer* observer_;
« no previous file with comments | « components/ntp_tiles/DEPS ('k') | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698