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

Unified Diff: chrome/browser/favicon/favicon_tab_helper.cc

Issue 1010783002: [Icons NTP] Working prototype to fetch, store, and display big icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/favicon/favicon_tab_helper.cc
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index 053cdfc20a923e9563844f47edd786e9be1e7513..5c1b4d4e484d237c2ac2f2cc12fd8fde4d5793e8 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -54,6 +54,8 @@ FaviconTabHelper::FaviconTabHelper(WebContents* web_contents)
if (chrome::kEnableTouchIcon)
touch_icon_handler_.reset(new FaviconHandler(
client_, this, FaviconHandler::TOUCH, download_largest_icon));
+ big_icon_handler_.reset(
Roger McFarlane (Chromium) 2015/03/16 19:00:59 maybe put these derefs behind a check for null? So
huangs 2015/03/17 01:43:52 Done.
+ new FaviconHandler(client_, this, FaviconHandler::BIG, true));
}
FaviconTabHelper::~FaviconTabHelper() {
@@ -63,6 +65,7 @@ void FaviconTabHelper::FetchFavicon(const GURL& url) {
favicon_handler_->FetchFavicon(url);
if (touch_icon_handler_.get())
touch_icon_handler_->FetchFavicon(url);
+ big_icon_handler_->FetchFavicon(url);
}
gfx::Image FaviconTabHelper::GetFavicon() const {
@@ -282,6 +285,7 @@ void FaviconTabHelper::DidUpdateFaviconURL(
favicon_handler_->OnUpdateFaviconURL(favicon_urls);
if (touch_icon_handler_.get())
touch_icon_handler_->OnUpdateFaviconURL(favicon_urls);
+ big_icon_handler_->OnUpdateFaviconURL(favicon_urls);
}
void FaviconTabHelper::DidDownloadFavicon(
@@ -305,4 +309,6 @@ void FaviconTabHelper::DidDownloadFavicon(
touch_icon_handler_->OnDidDownloadFavicon(
id, image_url, bitmaps, original_bitmap_sizes);
}
+ big_icon_handler_->OnDidDownloadFavicon(
+ id, image_url, bitmaps, original_bitmap_sizes);
}

Powered by Google App Engine
This is Rietveld 408576698