| Index: components/favicon/content/content_favicon_driver.h
|
| diff --git a/components/favicon/content/content_favicon_driver.h b/components/favicon/content/content_favicon_driver.h
|
| index 75f5dbee954a68fab735256ecd4f055877038fb8..3ba217bff6bb41927691984a372c84729d69d9d7 100644
|
| --- a/components/favicon/content/content_favicon_driver.h
|
| +++ b/components/favicon/content/content_favicon_driver.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "base/macros.h"
|
| #include "components/favicon/core/favicon_driver_impl.h"
|
| +#include "components/favicon/core/favicon_handler.h"
|
| #include "content/public/browser/reload_type.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
| #include "content/public/browser/web_contents_user_data.h"
|
| @@ -17,6 +18,10 @@ struct FaviconURL;
|
| class WebContents;
|
| }
|
|
|
| +namespace bookmarks {
|
| +class BookmarkModel;
|
| +}
|
| +
|
| namespace favicon {
|
|
|
| // ContentFaviconDriver is an implementation of FaviconDriver that listens to
|
| @@ -25,6 +30,7 @@ namespace favicon {
|
| class ContentFaviconDriver
|
| : public content::WebContentsObserver,
|
| public content::WebContentsUserData<ContentFaviconDriver>,
|
| + public FaviconHandler::Delegate,
|
| public FaviconDriverImpl {
|
| public:
|
| static void CreateForWebContents(content::WebContents* web_contents,
|
| @@ -45,28 +51,28 @@ class ContentFaviconDriver
|
| // FaviconDriver implementation.
|
| gfx::Image GetFavicon() const override;
|
| bool FaviconIsValid() const override;
|
| - int StartDownload(const GURL& url, int max_bitmap_size) override;
|
| - bool IsOffTheRecord() override;
|
| GURL GetActiveURL() override;
|
|
|
| + // FaviconHandler::Delegate implementation.
|
| + int DownloadImage(const GURL& url,
|
| + int max_image_size,
|
| + ImageDownloadCallback callback) override;
|
| + bool IsOffTheRecord() override;
|
| + void OnFaviconUpdated(const GURL& page_url,
|
| + FaviconDriverObserver::NotificationIconType icon_type,
|
| + const GURL& icon_url,
|
| + bool icon_url_changed,
|
| + const gfx::Image& image) override;
|
| +
|
| protected:
|
| ContentFaviconDriver(content::WebContents* web_contents,
|
| FaviconService* favicon_service,
|
| - history::HistoryService* history_service,
|
| - bookmarks::BookmarkModel* bookmark_model);
|
| + history::HistoryService* history_service);
|
| ~ContentFaviconDriver() override;
|
|
|
| private:
|
| friend class content::WebContentsUserData<ContentFaviconDriver>;
|
|
|
| - // FaviconDriver implementation.
|
| - void OnFaviconUpdated(
|
| - const GURL& page_url,
|
| - FaviconDriverObserver::NotificationIconType icon_type,
|
| - const GURL& icon_url,
|
| - bool icon_url_changed,
|
| - const gfx::Image& image) override;
|
| -
|
| // content::WebContentsObserver implementation.
|
| void DidUpdateFaviconURL(
|
| const std::vector<content::FaviconURL>& candidates) override;
|
|
|