OLD | NEW |
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 29 matching lines...) Expand all Loading... |
40 namespace webkit_glue { | 40 namespace webkit_glue { |
41 struct WebIntentData; | 41 struct WebIntentData; |
42 struct WebIntentServiceData; | 42 struct WebIntentServiceData; |
43 } | 43 } |
44 | 44 |
45 namespace content { | 45 namespace content { |
46 class BrowserPluginEmbedder; | 46 class BrowserPluginEmbedder; |
47 class BrowserPluginGuest; | 47 class BrowserPluginGuest; |
48 class ColorChooser; | 48 class ColorChooser; |
49 class DownloadItem; | 49 class DownloadItem; |
| 50 class FaviconDownloadDelegate; |
50 class InterstitialPageImpl; | 51 class InterstitialPageImpl; |
51 class JavaScriptDialogCreator; | 52 class JavaScriptDialogCreator; |
52 class RenderViewHost; | 53 class RenderViewHost; |
53 class RenderViewHostDelegateView; | 54 class RenderViewHostDelegateView; |
54 class RenderViewHostImpl; | 55 class RenderViewHostImpl; |
55 class RenderWidgetHostImpl; | 56 class RenderWidgetHostImpl; |
56 class SavePackage; | 57 class SavePackage; |
57 class SessionStorageNamespaceImpl; | 58 class SessionStorageNamespaceImpl; |
58 class SiteInstance; | 59 class SiteInstance; |
59 class TestWebContents; | 60 class TestWebContents; |
60 class WebContentsDelegate; | 61 class WebContentsDelegate; |
61 class WebContentsImpl; | 62 class WebContentsImpl; |
62 class WebContentsObserver; | 63 class WebContentsObserver; |
63 class WebContentsView; | 64 class WebContentsView; |
64 class WebContentsViewDelegate; | 65 class WebContentsViewDelegate; |
| 66 struct FaviconURL; |
65 struct LoadNotificationDetails; | 67 struct LoadNotificationDetails; |
66 | 68 |
67 // Factory function for the implementations that content knows about. Takes | 69 // Factory function for the implementations that content knows about. Takes |
68 // ownership of |delegate|. | 70 // ownership of |delegate|. |
69 WebContentsView* CreateWebContentsView( | 71 WebContentsView* CreateWebContentsView( |
70 WebContentsImpl* web_contents, | 72 WebContentsImpl* web_contents, |
71 WebContentsViewDelegate* delegate, | 73 WebContentsViewDelegate* delegate, |
72 RenderViewHostDelegateView** render_view_host_delegate_view); | 74 RenderViewHostDelegateView** render_view_host_delegate_view); |
73 | 75 |
74 class CONTENT_EXPORT WebContentsImpl | 76 class CONTENT_EXPORT WebContentsImpl |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 virtual int GetMaximumZoomPercent() const OVERRIDE; | 272 virtual int GetMaximumZoomPercent() const OVERRIDE; |
271 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 273 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
272 virtual int GetContentRestrictions() const OVERRIDE; | 274 virtual int GetContentRestrictions() const OVERRIDE; |
273 virtual WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; | 275 virtual WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; |
274 virtual WebUI* GetWebUIForCurrentState() OVERRIDE; | 276 virtual WebUI* GetWebUIForCurrentState() OVERRIDE; |
275 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; | 277 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; |
276 virtual bool HasOpener() const OVERRIDE; | 278 virtual bool HasOpener() const OVERRIDE; |
277 virtual void DidChooseColorInColorChooser(int color_chooser_id, | 279 virtual void DidChooseColorInColorChooser(int color_chooser_id, |
278 SkColor color) OVERRIDE; | 280 SkColor color) OVERRIDE; |
279 virtual void DidEndColorChooser(int color_chooser_id) OVERRIDE; | 281 virtual void DidEndColorChooser(int color_chooser_id) OVERRIDE; |
| 282 virtual int DownloadFavicon(const GURL& url, int image_size) OVERRIDE; |
| 283 virtual void RegisterFaviconDelegate( |
| 284 FaviconDownloadDelegate* delegate) OVERRIDE; |
280 | 285 |
281 // Implementation of PageNavigator. | 286 // Implementation of PageNavigator. |
282 virtual WebContents* OpenURL(const OpenURLParams& params) OVERRIDE; | 287 virtual WebContents* OpenURL(const OpenURLParams& params) OVERRIDE; |
283 | 288 |
284 // Implementation of IPC::Sender. | 289 // Implementation of IPC::Sender. |
285 virtual bool Send(IPC::Message* message) OVERRIDE; | 290 virtual bool Send(IPC::Message* message) OVERRIDE; |
286 | 291 |
287 // RenderViewHostDelegate ---------------------------------------------------- | 292 // RenderViewHostDelegate ---------------------------------------------------- |
288 | 293 |
289 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE; | 294 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE; |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 bool is_hung); | 569 bool is_hung); |
565 void OnWebUISend(const GURL& source_url, | 570 void OnWebUISend(const GURL& source_url, |
566 const std::string& name, | 571 const std::string& name, |
567 const base::ListValue& args); | 572 const base::ListValue& args); |
568 void OnRequestPpapiBrokerPermission(int request_id, | 573 void OnRequestPpapiBrokerPermission(int request_id, |
569 const GURL& url, | 574 const GURL& url, |
570 const FilePath& plugin_path); | 575 const FilePath& plugin_path); |
571 void OnBrowserPluginCreateGuest( | 576 void OnBrowserPluginCreateGuest( |
572 int instance_id, | 577 int instance_id, |
573 const BrowserPluginHostMsg_CreateGuest_Params& params); | 578 const BrowserPluginHostMsg_CreateGuest_Params& params); |
| 579 void OnDidDownloadFavicon(int id, |
| 580 const GURL& image_url, |
| 581 bool errored, |
| 582 int requested_size, |
| 583 const std::vector<SkBitmap>& bitmaps); |
| 584 void OnUpdateFaviconURL(int32 page_id, |
| 585 const std::vector<FaviconURL>& candidates); |
574 | 586 |
575 // Changes the IsLoading state and notifies delegate as needed | 587 // Changes the IsLoading state and notifies delegate as needed |
576 // |details| is used to provide details on the load that just finished | 588 // |details| is used to provide details on the load that just finished |
577 // (but can be null if not applicable). Can be overridden. | 589 // (but can be null if not applicable). Can be overridden. |
578 void SetIsLoading(bool is_loading, | 590 void SetIsLoading(bool is_loading, |
579 LoadNotificationDetails* details); | 591 LoadNotificationDetails* details); |
580 | 592 |
581 // Called by derived classes to indicate that we're no longer waiting for a | 593 // Called by derived classes to indicate that we're no longer waiting for a |
582 // response. This won't actually update the throbber, but it will get picked | 594 // response. This won't actually update the throbber, but it will get picked |
583 // up at the next animation step if the throbber is going. | 595 // up at the next animation step if the throbber is going. |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 NotificationRegistrar registrar_; | 863 NotificationRegistrar registrar_; |
852 | 864 |
853 // Used during IPC message dispatching so that the handlers can get a pointer | 865 // Used during IPC message dispatching so that the handlers can get a pointer |
854 // to the RVH through which the message was received. | 866 // to the RVH through which the message was received. |
855 RenderViewHost* message_source_; | 867 RenderViewHost* message_source_; |
856 | 868 |
857 // All live RenderWidgetHostImpls that are created by this object and may | 869 // All live RenderWidgetHostImpls that are created by this object and may |
858 // outlive it. | 870 // outlive it. |
859 std::set<RenderWidgetHostImpl*> created_widgets_; | 871 std::set<RenderWidgetHostImpl*> created_widgets_; |
860 | 872 |
| 873 // Tracks all pending favicon downloads. |
| 874 typedef std::set<int> DownloadIdList; |
| 875 DownloadIdList favicon_download_ids_; |
| 876 |
| 877 // Delegate for notifying about favicon-related events. Not owned by us. |
| 878 FaviconDownloadDelegate* favicon_download_delegate_; |
| 879 |
861 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 880 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
862 }; | 881 }; |
863 | 882 |
864 } // namespace content | 883 } // namespace content |
865 | 884 |
866 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 885 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |