Chromium Code Reviews| 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_; |