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

Unified Diff: components/favicon/core/favicon_driver.h

Issue 684983003: Add Observer in FaviconTabHelper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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: components/favicon/core/favicon_driver.h
diff --git a/components/favicon/core/favicon_driver.h b/components/favicon/core/favicon_driver.h
index dadd43c12e7be7ca93db8eac4d5bacc0ddd44b09..d2286529d646f5c303d9812a4530bc93a12a00fa 100644
--- a/components/favicon/core/favicon_driver.h
+++ b/components/favicon/core/favicon_driver.h
@@ -27,11 +27,6 @@ class FaviconDriver {
// is the only result. A |max_bitmap_size| of 0 means unlimited.
virtual int StartDownload(const GURL& url, int max_bitmap_size) = 0;
- // Notifies the driver that the favicon for the active entry was updated.
- // |icon_url_changed| is true if a favicon with a different icon URL has
- // been selected since the previous call to NotifyFaviconUpdated().
- virtual void NotifyFaviconUpdated(bool icon_url_changed) = 0;
-
// Returns whether the user is operating in an off-the-record context.
virtual bool IsOffTheRecord() = 0;
@@ -51,16 +46,13 @@ class FaviconDriver {
// URL otherwise.
virtual const GURL GetActiveURL() = 0;
- // Sets the bitmap of the current page's favicon. Requires GetActiveURL() to
- // be valid.
- virtual void SetActiveFaviconImage(gfx::Image image) = 0;
-
- // Sets the URL of the favicon's bitmap. Requires GetActiveURL() to be valid.
- virtual void SetActiveFaviconURL(GURL url) = 0;
-
- // Sets whether the page's favicon is valid (if false, the default favicon is
- // being used). Requires GetActiveURL() to be valid.
- virtual void SetActiveFaviconValidity(bool validity) = 0;
+ // Notifies the driver favicon |image| is available to use. |image| might
sky 2014/11/04 18:11:43 update_active_image -> is_active_favicon. Notifie
michaelbai 2014/11/04 19:26:57 Done.
+ // not be 16x16 one, |icon_url| is image's url, if |update_active_favicon|
+ // is True, active favicon shall be validated, active favicon image and url
+ // should be set to |image| and |icon_url| respectively.
+ virtual void OnFaviconAvailable(const gfx::Image& image,
+ const GURL& icon_url,
+ bool update_active_favicon) = 0;
};
#endif // COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_H_
« chrome/browser/favicon/favicon_tab_helper.h ('K') | « chrome/browser/favicon/favicon_tab_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698