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

Unified Diff: content/browser/web_contents/web_contents_impl.h

Issue 11411180: move favicon download code from chrome/ into content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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: content/browser/web_contents/web_contents_impl.h
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 8e45301c60c80bd5721efa790ffae316efc49483..8313dec6a5828c4d54c18c534fb0ef26ffdf3104 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -47,6 +47,7 @@ class BrowserPluginEmbedder;
class BrowserPluginGuest;
class ColorChooser;
class DownloadItem;
+class FaviconDownloadDelegate;
class InterstitialPageImpl;
class JavaScriptDialogCreator;
class RenderViewHost;
@@ -62,6 +63,7 @@ class WebContentsImpl;
class WebContentsObserver;
class WebContentsView;
class WebContentsViewDelegate;
+struct FaviconURL;
struct LoadNotificationDetails;
// Factory function for the implementations that content knows about. Takes
@@ -277,6 +279,9 @@ class CONTENT_EXPORT WebContentsImpl
virtual void DidChooseColorInColorChooser(int color_chooser_id,
SkColor color) OVERRIDE;
virtual void DidEndColorChooser(int color_chooser_id) OVERRIDE;
+ virtual int DownloadFavicon(const GURL& url, int image_size) OVERRIDE;
+ virtual void RegisterFaviconDelegate(
+ FaviconDownloadDelegate* delegate) OVERRIDE;
// Implementation of PageNavigator.
virtual WebContents* OpenURL(const OpenURLParams& params) OVERRIDE;
@@ -571,6 +576,13 @@ class CONTENT_EXPORT WebContentsImpl
void OnBrowserPluginCreateGuest(
int instance_id,
const BrowserPluginHostMsg_CreateGuest_Params& params);
+ void OnDidDownloadFavicon(int id,
+ const GURL& image_url,
+ bool errored,
+ int requested_size,
+ const std::vector<SkBitmap>& bitmaps);
+ void OnUpdateFaviconURL(int32 page_id,
+ const std::vector<FaviconURL>& candidates);
// Changes the IsLoading state and notifies delegate as needed
// |details| is used to provide details on the load that just finished
@@ -858,6 +870,13 @@ class CONTENT_EXPORT WebContentsImpl
// outlive it.
std::set<RenderWidgetHostImpl*> created_widgets_;
+ // Tracks all pending favicon downloads.
+ typedef std::set<int> DownloadIdList;
+ DownloadIdList favicon_download_ids_;
+
+ // Delegate for notifying about favicon-related events. Not owned by us.
+ FaviconDownloadDelegate* favicon_download_delegate_;
+
DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
};

Powered by Google App Engine
This is Rietveld 408576698