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

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

Issue 835903005: [Favicon] Add new fallback icon rendering flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor by extracting FallbackIconSpecsBuilder. Created 5 years, 11 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 | « no previous file | chrome/browser/favicon/favicon_service.cc » ('j') | chrome/browser/ui/webui/favicon_source.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/favicon/favicon_service.h
diff --git a/chrome/browser/favicon/favicon_service.h b/chrome/browser/favicon/favicon_service.h
index 06c1a66ec29bf9c5095da64abffda5248d4ffa52..293f443fbe92fd25267423aa28556b1ddd934ba9 100644
--- a/chrome/browser/favicon/favicon_service.h
+++ b/chrome/browser/favicon/favicon_service.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_FAVICON_FAVICON_SERVICE_H_
#define CHROME_BROWSER_FAVICON_FAVICON_SERVICE_H_
+#include <memory>
#include <vector>
#include "base/callback.h"
@@ -21,6 +22,11 @@ class HistoryService;
struct ImportedFaviconUsage;
class Profile;
+namespace favicon_base {
+class FallbackIconService;
+struct FallbackIconSpecs;
+} // namespace favicon_base
+
// The favicon service provides methods to access favicons. It calls the history
// backend behind the scenes. The callbacks are run asynchronously, even in the
// case of an error.
@@ -79,6 +85,18 @@ class FaviconService : public KeyedService {
const favicon_base::FaviconResultsCallback& callback,
base::CancelableTaskTracker* tracker);
+ // Generates a fallback favicon for |icon_url| with size |size_in_pixel|,
+ // using auxiliary rendering parameters in |params|. |size_in_pixel| = 0
+ // specifies maximum fallback favicon size. |specs| does not need to live
+ // beyond the function call.
pkotwicz 2015/01/19 04:32:02 My hope is that this function will never be needed
huangs 2015/01/20 22:20:41 Simplified, and named everything "FallbackIcon" or
+ base::CancelableTaskTracker::TaskId GetRawFallbackFaviconImage(
+ const GURL& icon_url,
+ favicon_base::IconType icon_type,
+ int desired_size_in_pixel,
+ const favicon_base::FallbackIconSpecs& specs,
+ const favicon_base::FaviconRawBitmapCallback& callback,
+ base::CancelableTaskTracker* tracker);
+
//////////////////////////////////////////////////////////////////////////////
// Methods to request favicon bitmaps from the history backend for |page_url|.
// |page_url| is the web page the favicon is associated with.
@@ -214,6 +232,7 @@ class FaviconService : public KeyedService {
typedef uint32 MissingFaviconURLHash;
base::hash_set<MissingFaviconURLHash> missing_favicon_urls_;
HistoryService* history_service_;
+ std::unique_ptr<favicon_base::FallbackIconService> fallback_icon_service_;
Profile* profile_;
FaviconClient* favicon_client_;
« no previous file with comments | « no previous file | chrome/browser/favicon/favicon_service.cc » ('j') | chrome/browser/ui/webui/favicon_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698