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

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

Issue 261403003: Removes usage of NavigationEntry from favicon_handler.* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review fixes v2. Created 6 years, 7 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 | « chrome/browser/favicon/favicon_tab_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/favicon/core/favicon_driver.h
diff --git a/components/favicon/core/favicon_driver.h b/components/favicon/core/favicon_driver.h
index 937ace877d616c2a2a3d90f41f4c79ef06c551e6..dadd43c12e7be7ca93db8eac4d5bacc0ddd44b09 100644
--- a/components/favicon/core/favicon_driver.h
+++ b/components/favicon/core/favicon_driver.h
@@ -7,9 +7,8 @@
class GURL;
-namespace content {
-// TODO(jif): Abstract the NavigationEntry (crbug.com/359598).
-class NavigationEntry;
+namespace gfx {
+class Image;
}
// Interface that allows Favicon core code to interact with its driver (i.e.,
@@ -17,9 +16,6 @@ class NavigationEntry;
// implementation must be provided by the driver.
class FaviconDriver {
public:
- // Returns the current NavigationEntry.
- // TODO(jif): Abstract the NavigationEntry (crbug.com/359598).
- virtual content::NavigationEntry* GetActiveEntry() = 0;
// Starts the download for the given favicon. When finished, the driver
// will call OnDidDownloadFavicon() with the results.
@@ -38,6 +34,33 @@ class FaviconDriver {
// Returns whether the user is operating in an off-the-record context.
virtual bool IsOffTheRecord() = 0;
+
+ // Returns the bitmap of the current page's favicon. Requires GetActiveURL()
+ // to be valid.
+ virtual const gfx::Image GetActiveFaviconImage() = 0;
+
+ // Returns the URL of the current page's favicon. Requires GetActiveURL() to
+ // be valid.
+ virtual const GURL GetActiveFaviconURL() = 0;
+
+ // Returns whether the page's favicon is valid (returns false if the default
+ // favicon is being used). Requires GetActiveURL() to be valid.
+ virtual bool GetActiveFaviconValidity() = 0;
+
+ // Returns the URL of the current page, if any. Returns an invalid
+ // 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;
};
#endif // COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_H_
« no previous file with comments | « 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