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 <string> | 9 #include <string> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... | |
32 #include "base/win/scoped_handle.h" | 32 #include "base/win/scoped_handle.h" |
33 #endif | 33 #endif |
34 | 34 |
35 class InterstitialPageImpl; | 35 class InterstitialPageImpl; |
36 class SavePackage; | 36 class SavePackage; |
37 class SessionStorageNamespaceImpl; | 37 class SessionStorageNamespaceImpl; |
38 class WebContentsImpl; | 38 class WebContentsImpl; |
39 struct ViewMsg_PostMessage_Params; | 39 struct ViewMsg_PostMessage_Params; |
40 | 40 |
41 namespace content { | 41 namespace content { |
42 class BrowserPluginEmbedder; | |
43 class BrowserPluginGuest; | |
42 class ColorChooser; | 44 class ColorChooser; |
43 class DownloadItem; | 45 class DownloadItem; |
44 class JavaScriptDialogCreator; | 46 class JavaScriptDialogCreator; |
45 class RenderViewHost; | 47 class RenderViewHost; |
46 class RenderViewHostDelegateView; | 48 class RenderViewHostDelegateView; |
47 class RenderViewHostImpl; | 49 class RenderViewHostImpl; |
48 class SiteInstance; | 50 class SiteInstance; |
49 class TestWebContents; | 51 class TestWebContents; |
50 class WebContentsDelegate; | 52 class WebContentsDelegate; |
51 class WebContentsObserver; | 53 class WebContentsObserver; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
145 content::old::BrowserPluginHost* old_browser_plugin_host() const { | 147 content::old::BrowserPluginHost* old_browser_plugin_host() const { |
146 return old_browser_plugin_host_.get(); | 148 return old_browser_plugin_host_.get(); |
147 } | 149 } |
148 | 150 |
149 // Like GetController from WebContents, but returns the concrete object. | 151 // Like GetController from WebContents, but returns the concrete object. |
150 NavigationControllerImpl& GetControllerImpl(); | 152 NavigationControllerImpl& GetControllerImpl(); |
151 | 153 |
152 // Expose the render manager for testing. | 154 // Expose the render manager for testing. |
153 RenderViewHostManager* GetRenderManagerForTesting(); | 155 RenderViewHostManager* GetRenderManagerForTesting(); |
154 | 156 |
157 // Adds guest to this WebContents embedder. | |
158 content::BrowserPluginGuest* AddBrowserPluginGuest(int instance_id); | |
159 // Returns guest browser plugin object, NULL if this WebContents is not a | |
160 // guest. | |
161 content::BrowserPluginGuest* GetBrowserPluginGuest(); | |
162 // Returns embedder browser plugin object, NULL if this WebContents is not an | |
163 // embedder. | |
164 content::BrowserPluginEmbedder* GetBrowserPluginEmbedder(); | |
165 | |
155 // content::WebContents ------------------------------------------------------ | 166 // content::WebContents ------------------------------------------------------ |
156 virtual const base::PropertyBag* GetPropertyBag() const OVERRIDE; | 167 virtual const base::PropertyBag* GetPropertyBag() const OVERRIDE; |
157 virtual base::PropertyBag* GetPropertyBag() OVERRIDE; | 168 virtual base::PropertyBag* GetPropertyBag() OVERRIDE; |
158 virtual content::WebContentsDelegate* GetDelegate() OVERRIDE; | 169 virtual content::WebContentsDelegate* GetDelegate() OVERRIDE; |
159 virtual void SetDelegate(content::WebContentsDelegate* delegate) OVERRIDE; | 170 virtual void SetDelegate(content::WebContentsDelegate* delegate) OVERRIDE; |
160 virtual content::NavigationController& GetController() OVERRIDE; | 171 virtual content::NavigationController& GetController() OVERRIDE; |
161 virtual const content::NavigationController& GetController() const OVERRIDE; | 172 virtual const content::NavigationController& GetController() const OVERRIDE; |
162 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; | 173 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; |
163 virtual content::RenderProcessHost* GetRenderProcessHost() const OVERRIDE; | 174 virtual content::RenderProcessHost* GetRenderProcessHost() const OVERRIDE; |
164 virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE; | 175 virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE; |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
512 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); | 523 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); |
513 void OnOpenColorChooser(int color_chooser_id, SkColor color); | 524 void OnOpenColorChooser(int color_chooser_id, SkColor color); |
514 void OnEndColorChooser(int color_chooser_id); | 525 void OnEndColorChooser(int color_chooser_id); |
515 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color); | 526 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color); |
516 void OnPepperPluginHung(int plugin_child_id, | 527 void OnPepperPluginHung(int plugin_child_id, |
517 const FilePath& path, | 528 const FilePath& path, |
518 bool is_hung); | 529 bool is_hung); |
519 void OnWebUISend(const GURL& source_url, | 530 void OnWebUISend(const GURL& source_url, |
520 const std::string& name, | 531 const std::string& name, |
521 const base::ListValue& args); | 532 const base::ListValue& args); |
533 void OnBrowserPluginNavigateGuest(int instance_id, | |
534 int64 frame_id, | |
535 std::string src, | |
536 gfx::Size size); | |
522 | 537 |
523 // Changes the IsLoading state and notifies delegate as needed | 538 // Changes the IsLoading state and notifies delegate as needed |
524 // |details| is used to provide details on the load that just finished | 539 // |details| is used to provide details on the load that just finished |
525 // (but can be null if not applicable). Can be overridden. | 540 // (but can be null if not applicable). Can be overridden. |
526 void SetIsLoading(bool is_loading, | 541 void SetIsLoading(bool is_loading, |
527 content::LoadNotificationDetails* details); | 542 content::LoadNotificationDetails* details); |
528 | 543 |
529 // Called by derived classes to indicate that we're no longer waiting for a | 544 // Called by derived classes to indicate that we're no longer waiting for a |
530 // response. This won't actually update the throbber, but it will get picked | 545 // response. This won't actually update the throbber, but it will get picked |
531 // up at the next animation step if the throbber is going. | 546 // up at the next animation step if the throbber is going. |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
668 | 683 |
669 // Manages creation and swapping of render views. | 684 // Manages creation and swapping of render views. |
670 RenderViewHostManager render_manager_; | 685 RenderViewHostManager render_manager_; |
671 | 686 |
672 // Manages injecting Java objects into all RenderViewHosts associated with | 687 // Manages injecting Java objects into all RenderViewHosts associated with |
673 // this WebContentsImpl. | 688 // this WebContentsImpl. |
674 scoped_ptr<JavaBridgeDispatcherHostManager> | 689 scoped_ptr<JavaBridgeDispatcherHostManager> |
675 java_bridge_dispatcher_host_manager_; | 690 java_bridge_dispatcher_host_manager_; |
676 | 691 |
677 // TODO(fsamuel): Remove this once upstreaming of the new browser plugin | 692 // TODO(fsamuel): Remove this once upstreaming of the new browser plugin |
678 // implmentation is complete. | 693 // implementation is complete. |
679 // Manages the browser plugin instances hosted by this WebContents. | 694 // Manages the browser plugin instances hosted by this WebContents. |
680 scoped_ptr<content::old::BrowserPluginHost> old_browser_plugin_host_; | 695 scoped_ptr<content::old::BrowserPluginHost> old_browser_plugin_host_; |
681 | 696 |
682 // SavePackage, lazily created. | 697 // SavePackage, lazily created. |
683 scoped_refptr<SavePackage> save_package_; | 698 scoped_refptr<SavePackage> save_package_; |
684 | 699 |
685 // Data for loading state ---------------------------------------------------- | 700 // Data for loading state ---------------------------------------------------- |
686 | 701 |
687 // Indicates whether we're currently loading a resource. | 702 // Indicates whether we're currently loading a resource. |
688 bool is_loading_; | 703 bool is_loading_; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
787 // The intrinsic size of the page. | 802 // The intrinsic size of the page. |
788 gfx::Size preferred_size_; | 803 gfx::Size preferred_size_; |
789 | 804 |
790 // Content restrictions, used to disable print/copy etc based on content's | 805 // Content restrictions, used to disable print/copy etc based on content's |
791 // (full-page plugins for now only) permissions. | 806 // (full-page plugins for now only) permissions. |
792 int content_restrictions_; | 807 int content_restrictions_; |
793 | 808 |
794 // Color chooser that was opened by this tab. | 809 // Color chooser that was opened by this tab. |
795 content::ColorChooser* color_chooser_; | 810 content::ColorChooser* color_chooser_; |
796 | 811 |
812 // Browser plugin embedder for WebContents. | |
Charlie Reis
2012/08/27 20:23:59
These comments are redundant with the class name.
lazyboy
2012/08/28 19:07:14
Done.
| |
813 scoped_ptr<content::BrowserPluginEmbedder> browser_plugin_embedder_; | |
814 // Browser plugin guest for WebContents. | |
815 scoped_ptr<content::BrowserPluginGuest> browser_plugin_guest_; | |
816 | |
797 // This must be at the end, or else we might get notifications and use other | 817 // This must be at the end, or else we might get notifications and use other |
798 // member variables that are gone. | 818 // member variables that are gone. |
799 content::NotificationRegistrar registrar_; | 819 content::NotificationRegistrar registrar_; |
800 | 820 |
801 // Used during IPC message dispatching so that the handlers can get a pointer | 821 // Used during IPC message dispatching so that the handlers can get a pointer |
802 // to the RVH through which the message was received. | 822 // to the RVH through which the message was received. |
803 content::RenderViewHost* message_source_; | 823 content::RenderViewHost* message_source_; |
804 | 824 |
805 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 825 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
806 }; | 826 }; |
807 | 827 |
808 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 828 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |