diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 16:24:33 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 16:24:33 +0000 |
commit | bf5c2ff3931c43b98095d33f8bc1b98379afe16f (patch) | |
tree | 7c87f5a7f693ac8b5a43cf5f2eebe0ac462b1853 /chrome/browser/fav_icon_helper.h | |
parent | e9d7b6cf453475ad269785f3775700339c8a03fb (diff) | |
download | chromium_src-bf5c2ff3931c43b98095d33f8bc1b98379afe16f.zip chromium_src-bf5c2ff3931c43b98095d33f8bc1b98379afe16f.tar.gz chromium_src-bf5c2ff3931c43b98095d33f8bc1b98379afe16f.tar.bz2 |
Split out some of the RVHDelegate functions into separate sub-classes. To limit
the scope, this patch just contains those delegate functions implemented only
by TabContents, plus the favicon functions implemented by the FavIconHelper.
The only changes are re-ordering and moving the functions, and changes in the
way that the functions are called through the new optional delegate.
Review URL: http://codereview.chromium.org/149239
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20152 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/fav_icon_helper.h')
-rw-r--r-- | chrome/browser/fav_icon_helper.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/chrome/browser/fav_icon_helper.h b/chrome/browser/fav_icon_helper.h index 3a674d5..adbcaf0 100644 --- a/chrome/browser/fav_icon_helper.h +++ b/chrome/browser/fav_icon_helper.h @@ -12,6 +12,7 @@ #include "base/scoped_ptr.h" #include "chrome/browser/cancelable_request.h" #include "chrome/browser/history/history.h" +#include "chrome/browser/renderer_host/render_view_host_delegate.h" #include "chrome/common/ref_counted_util.h" #include "googleurl/src/gurl.h" @@ -61,17 +62,13 @@ class TabContents; // at which point we update the favicon of the NavigationEntry and notify // the database to save the favicon. -class FavIconHelper { +class FavIconHelper : public RenderViewHostDelegate::FavIcon { public: explicit FavIconHelper(TabContents* tab_contents); // Initiates loading the favicon for the specified url. void FetchFavIcon(const GURL& url); - // Sets the url of the favicon for the specified page. This is invoked some - // time after FetchFavIcon. - void SetFavIconURL(const GURL& icon_url); - // Sets the image data for the favicon. This is invoked asynchronously after // we request the TabContents to download the favicon. void SetFavIcon(int download_id, @@ -100,6 +97,16 @@ class FavIconHelper { GURL fav_icon_url; }; + // RenderViewHostDelegate::Favicon implementation. + virtual void DidDownloadFavIcon(RenderViewHost* render_view_host, + int id, + const GURL& image_url, + bool errored, + const SkBitmap& image); + virtual void UpdateFavIconURL(RenderViewHost* render_view_host, + int32 page_id, + const GURL& icon_url); + // Return the NavigationEntry for the active entry, or NULL if the active // entries URL does not match that of the URL last passed to FetchFavIcon. NavigationEntry* GetEntry(); |