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

Unified Diff: chrome/browser/favicon/favicon_tab_helper.h

Issue 11411180: move favicon download code from chrome/ into content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: WebContentsObserver and callback Created 8 years 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: chrome/browser/favicon/favicon_tab_helper.h
diff --git a/chrome/browser/favicon/favicon_tab_helper.h b/chrome/browser/favicon/favicon_tab_helper.h
index 4dac6874a0a5354c38625c9765619e8ccf6cff49..261ab998d2924eb886c0c3e7d54380b7106d68b6 100644
--- a/chrome/browser/favicon/favicon_tab_helper.h
+++ b/chrome/browser/favicon/favicon_tab_helper.h
@@ -9,19 +9,17 @@
#include "base/basictypes.h"
#include "base/callback.h"
-#include "chrome/browser/favicon/favicon_download_helper_delegate.h"
#include "chrome/browser/favicon/favicon_handler_delegate.h"
#include "chrome/browser/history/history_types.h"
-#include "chrome/common/favicon_url.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
+#include "content/public/common/favicon_url.h"
namespace gfx {
class Image;
}
class GURL;
-class FaviconDownloadHelper;
class FaviconHandler;
class Profile;
class SkBitmap;
@@ -34,7 +32,6 @@ class SkBitmap;
//
class FaviconTabHelper : public content::WebContentsObserver,
public FaviconHandlerDelegate,
- public FaviconDownloadHelperDelegate,
public content::WebContentsUserData<FaviconTabHelper> {
public:
virtual ~FaviconTabHelper();
@@ -55,11 +52,11 @@ class FaviconTabHelper : public content::WebContentsObserver,
// space is provided for the favicon, and the favicon is never displayed.
virtual bool ShouldDisplayFavicon();
- // Message Handler. Must be public, because also called from
- // PrerenderContents.
- virtual void OnUpdateFaviconURL(
+ // content::WebContentsObserver override. Must be public, because also
+ // called from PrerenderContents.
+ virtual void DidUpdateFaviconURL(
int32 page_id,
- const std::vector<FaviconURL>& candidates) OVERRIDE;
+ const std::vector<content::FaviconURL>& candidates) OVERRIDE;
// Saves the favicon for the current page.
void SaveFavicon();
@@ -81,18 +78,16 @@ class FaviconTabHelper : public content::WebContentsObserver,
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) OVERRIDE;
- // FaviconDownloadHelperDelegate overrides.
- virtual void OnDidDownloadFavicon(
+ // Favicon download callback.
+ void DidDownloadFavicon(
int id,
const GURL& image_url,
bool errored,
int requested_size,
- const std::vector<SkBitmap>& bitmaps) OVERRIDE;
+ const std::vector<SkBitmap>& bitmaps);
Profile* profile_;
- scoped_ptr<FaviconDownloadHelper> favicon_download_helper_;
-
scoped_ptr<FaviconHandler> favicon_handler_;
// Handles downloading touchicons. It is NULL if

Powered by Google App Engine
This is Rietveld 408576698