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

Unified Diff: chrome/browser/favicon/favicon_handler.h

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_handler.h
diff --git a/chrome/browser/favicon/favicon_handler.h b/chrome/browser/favicon/favicon_handler.h
index 55656a660b1f780fe776e7f1a7cd4d3e77f88618..275cf1d9bb9964285cb1920cf67d5701767338e7 100644
--- a/chrome/browser/favicon/favicon_handler.h
+++ b/chrome/browser/favicon/favicon_handler.h
@@ -78,14 +78,18 @@ class FaviconHandler {
enum Type {
FAVICON,
TOUCH,
+ BIG,
};
FaviconHandler(FaviconClient* client,
FaviconDriver* driver,
- Type icon_type,
+ Type handler_type,
bool download_largest_icon);
virtual ~FaviconHandler();
+ // Returns the bit mask of favicon_base::IconType based on the handler's type.
+ static int GetIconTypesFromHandlerType(Type icon_type);
+
// Initiates loading the favicon for the specified url.
void FetchFavicon(const GURL& url);
@@ -93,7 +97,7 @@ class FaviconHandler {
// PrerenderContents. Collects the |image_urls| list.
void OnUpdateFaviconURL(const std::vector<favicon::FaviconURL>& candidates);
- // Processes the current image_irls_ entry, requesting the image from the
+ // Processes the current image_urls_ entry, requesting the image from the
// history / download service.
void ProcessCurrentUrl();
@@ -244,7 +248,7 @@ class FaviconHandler {
int preferred_icon_size() const {
if (download_largest_icon_)
return 0;
- return icon_types_ == favicon_base::FAVICON ? gfx::kFaviconSize : 0;
+ return handler_type_ == FAVICON ? gfx::kFaviconSize : 0;
}
// Sorts the entries in |image_urls_| by icon size in descending order.
@@ -271,6 +275,9 @@ class FaviconHandler {
typedef std::map<int, DownloadRequest> DownloadRequests;
DownloadRequests download_requests_;
+ // The type of the current handler.
+ const Type handler_type_;
+
// The combination of the supported icon types.
const int icon_types_;
« no previous file with comments | « no previous file | chrome/browser/favicon/favicon_handler.cc » ('j') | chrome/browser/favicon/favicon_tab_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698