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

Side by Side 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: fix order 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/favicon_helper.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 class RenderWidgetHostImpl; 55 class RenderWidgetHostImpl;
56 class SavePackage; 56 class SavePackage;
57 class SessionStorageNamespaceImpl; 57 class SessionStorageNamespaceImpl;
58 class SiteInstance; 58 class SiteInstance;
59 class TestWebContents; 59 class TestWebContents;
60 class WebContentsDelegate; 60 class WebContentsDelegate;
61 class WebContentsImpl; 61 class WebContentsImpl;
62 class WebContentsObserver; 62 class WebContentsObserver;
63 class WebContentsView; 63 class WebContentsView;
64 class WebContentsViewDelegate; 64 class WebContentsViewDelegate;
65 struct FaviconURL;
65 struct LoadNotificationDetails; 66 struct LoadNotificationDetails;
66 67
67 // Factory function for the implementations that content knows about. Takes 68 // Factory function for the implementations that content knows about. Takes
68 // ownership of |delegate|. 69 // ownership of |delegate|.
69 WebContentsView* CreateWebContentsView( 70 WebContentsView* CreateWebContentsView(
70 WebContentsImpl* web_contents, 71 WebContentsImpl* web_contents,
71 WebContentsViewDelegate* delegate, 72 WebContentsViewDelegate* delegate,
72 RenderViewHostDelegateView** render_view_host_delegate_view); 73 RenderViewHostDelegateView** render_view_host_delegate_view);
73 74
74 class CONTENT_EXPORT WebContentsImpl 75 class CONTENT_EXPORT WebContentsImpl
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 virtual int GetMaximumZoomPercent() const OVERRIDE; 271 virtual int GetMaximumZoomPercent() const OVERRIDE;
271 virtual gfx::Size GetPreferredSize() const OVERRIDE; 272 virtual gfx::Size GetPreferredSize() const OVERRIDE;
272 virtual int GetContentRestrictions() const OVERRIDE; 273 virtual int GetContentRestrictions() const OVERRIDE;
273 virtual WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; 274 virtual WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE;
274 virtual WebUI* GetWebUIForCurrentState() OVERRIDE; 275 virtual WebUI* GetWebUIForCurrentState() OVERRIDE;
275 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; 276 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE;
276 virtual bool HasOpener() const OVERRIDE; 277 virtual bool HasOpener() const OVERRIDE;
277 virtual void DidChooseColorInColorChooser(int color_chooser_id, 278 virtual void DidChooseColorInColorChooser(int color_chooser_id,
278 SkColor color) OVERRIDE; 279 SkColor color) OVERRIDE;
279 virtual void DidEndColorChooser(int color_chooser_id) OVERRIDE; 280 virtual void DidEndColorChooser(int color_chooser_id) OVERRIDE;
281 virtual int DownloadFavicon(const GURL& url, int image_size,
282 const FaviconDownloadCallback& callback) OVERRIDE;
280 283
281 // Implementation of PageNavigator. 284 // Implementation of PageNavigator.
282 virtual WebContents* OpenURL(const OpenURLParams& params) OVERRIDE; 285 virtual WebContents* OpenURL(const OpenURLParams& params) OVERRIDE;
283 286
284 // Implementation of IPC::Sender. 287 // Implementation of IPC::Sender.
285 virtual bool Send(IPC::Message* message) OVERRIDE; 288 virtual bool Send(IPC::Message* message) OVERRIDE;
286 289
287 // RenderViewHostDelegate ---------------------------------------------------- 290 // RenderViewHostDelegate ----------------------------------------------------
288 291
289 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE; 292 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE;
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 bool is_hung); 566 bool is_hung);
564 void OnWebUISend(const GURL& source_url, 567 void OnWebUISend(const GURL& source_url,
565 const std::string& name, 568 const std::string& name,
566 const base::ListValue& args); 569 const base::ListValue& args);
567 void OnRequestPpapiBrokerPermission(int request_id, 570 void OnRequestPpapiBrokerPermission(int request_id,
568 const GURL& url, 571 const GURL& url,
569 const FilePath& plugin_path); 572 const FilePath& plugin_path);
570 void OnBrowserPluginCreateGuest( 573 void OnBrowserPluginCreateGuest(
571 int instance_id, 574 int instance_id,
572 const BrowserPluginHostMsg_CreateGuest_Params& params); 575 const BrowserPluginHostMsg_CreateGuest_Params& params);
576 void OnDidDownloadFavicon(int id,
577 const GURL& image_url,
578 bool errored,
579 int requested_size,
580 const std::vector<SkBitmap>& bitmaps);
581 void OnUpdateFaviconURL(int32 page_id,
582 const std::vector<FaviconURL>& candidates);
573 583
574 // Changes the IsLoading state and notifies delegate as needed 584 // Changes the IsLoading state and notifies delegate as needed
575 // |details| is used to provide details on the load that just finished 585 // |details| is used to provide details on the load that just finished
576 // (but can be null if not applicable). Can be overridden. 586 // (but can be null if not applicable). Can be overridden.
577 void SetIsLoading(bool is_loading, 587 void SetIsLoading(bool is_loading,
578 LoadNotificationDetails* details); 588 LoadNotificationDetails* details);
579 589
580 // Called by derived classes to indicate that we're no longer waiting for a 590 // Called by derived classes to indicate that we're no longer waiting for a
581 // response. This won't actually update the throbber, but it will get picked 591 // response. This won't actually update the throbber, but it will get picked
582 // up at the next animation step if the throbber is going. 592 // up at the next animation step if the throbber is going.
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 NotificationRegistrar registrar_; 860 NotificationRegistrar registrar_;
851 861
852 // Used during IPC message dispatching so that the handlers can get a pointer 862 // Used during IPC message dispatching so that the handlers can get a pointer
853 // to the RVH through which the message was received. 863 // to the RVH through which the message was received.
854 RenderViewHost* message_source_; 864 RenderViewHost* message_source_;
855 865
856 // All live RenderWidgetHostImpls that are created by this object and may 866 // All live RenderWidgetHostImpls that are created by this object and may
857 // outlive it. 867 // outlive it.
858 std::set<RenderWidgetHostImpl*> created_widgets_; 868 std::set<RenderWidgetHostImpl*> created_widgets_;
859 869
870 // Maps the ids of pending favicon downloads to their callbacks
871 typedef std::map<int, FaviconDownloadCallback> FaviconDownloadMap;
872 FaviconDownloadMap favicon_download_map_;
873
860 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 874 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
861 }; 875 };
862 876
863 } // namespace content 877 } // namespace content
864 878
865 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 879 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/renderer/favicon_helper.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698