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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
16 #include "base/property_bag.h" | 16 #include "base/property_bag.h" |
| 17 #include "content/browser/browser_plugin/browser_plugin_host.h" |
17 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.h" | 18 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.h" |
18 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 19 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
19 #include "content/browser/web_contents/navigation_controller_impl.h" | 20 #include "content/browser/web_contents/navigation_controller_impl.h" |
20 #include "content/browser/web_contents/render_view_host_manager.h" | 21 #include "content/browser/web_contents/render_view_host_manager.h" |
21 #include "content/common/content_export.h" | 22 #include "content/common/content_export.h" |
22 #include "content/public/browser/notification_observer.h" | 23 #include "content/public/browser/notification_observer.h" |
23 #include "content/public/browser/notification_registrar.h" | 24 #include "content/public/browser/notification_registrar.h" |
24 #include "content/public/browser/render_view_host_delegate.h" | 25 #include "content/public/browser/render_view_host_delegate.h" |
25 #include "content/public/browser/web_contents.h" | 26 #include "content/public/browser/web_contents.h" |
26 #include "content/public/common/renderer_preferences.h" | 27 #include "content/public/common/renderer_preferences.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 } | 127 } |
127 | 128 |
128 void set_opener_web_ui_type(content::WebUI::TypeID opener_web_ui_type) { | 129 void set_opener_web_ui_type(content::WebUI::TypeID opener_web_ui_type) { |
129 opener_web_ui_type_ = opener_web_ui_type; | 130 opener_web_ui_type_ = opener_web_ui_type; |
130 } | 131 } |
131 | 132 |
132 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const { | 133 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const { |
133 return java_bridge_dispatcher_host_manager_.get(); | 134 return java_bridge_dispatcher_host_manager_.get(); |
134 } | 135 } |
135 | 136 |
| 137 content::BrowserPluginHost* browser_plugin_host() const { |
| 138 return browser_plugin_host_.get(); |
| 139 } |
| 140 |
136 // Like GetController from WebContents, but returns the concrete object. | 141 // Like GetController from WebContents, but returns the concrete object. |
137 NavigationControllerImpl& GetControllerImpl(); | 142 NavigationControllerImpl& GetControllerImpl(); |
138 | 143 |
139 // Expose the render manager for testing. | 144 // Expose the render manager for testing. |
140 RenderViewHostManager* GetRenderManagerForTesting(); | 145 RenderViewHostManager* GetRenderManagerForTesting(); |
141 | 146 |
142 // content::WebContents ------------------------------------------------------ | 147 // content::WebContents ------------------------------------------------------ |
143 virtual const base::PropertyBag* GetPropertyBag() const OVERRIDE; | 148 virtual const base::PropertyBag* GetPropertyBag() const OVERRIDE; |
144 virtual base::PropertyBag* GetPropertyBag() OVERRIDE; | 149 virtual base::PropertyBag* GetPropertyBag() OVERRIDE; |
145 virtual content::WebContentsDelegate* GetDelegate() OVERRIDE; | 150 virtual content::WebContentsDelegate* GetDelegate() OVERRIDE; |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 // Helper classes ------------------------------------------------------------ | 606 // Helper classes ------------------------------------------------------------ |
602 | 607 |
603 // Manages creation and swapping of render views. | 608 // Manages creation and swapping of render views. |
604 RenderViewHostManager render_manager_; | 609 RenderViewHostManager render_manager_; |
605 | 610 |
606 // Manages injecting Java objects into all RenderViewHosts associated with | 611 // Manages injecting Java objects into all RenderViewHosts associated with |
607 // this WebContentsImpl. | 612 // this WebContentsImpl. |
608 scoped_ptr<JavaBridgeDispatcherHostManager> | 613 scoped_ptr<JavaBridgeDispatcherHostManager> |
609 java_bridge_dispatcher_host_manager_; | 614 java_bridge_dispatcher_host_manager_; |
610 | 615 |
| 616 // Manages the browser plugin instances hosted by this WebContents. |
| 617 scoped_ptr<content::BrowserPluginHost> browser_plugin_host_; |
| 618 |
611 // SavePackage, lazily created. | 619 // SavePackage, lazily created. |
612 scoped_refptr<SavePackage> save_package_; | 620 scoped_refptr<SavePackage> save_package_; |
613 | 621 |
614 // Data for loading state ---------------------------------------------------- | 622 // Data for loading state ---------------------------------------------------- |
615 | 623 |
616 // Indicates whether we're currently loading a resource. | 624 // Indicates whether we're currently loading a resource. |
617 bool is_loading_; | 625 bool is_loading_; |
618 | 626 |
619 // Indicates if the tab is considered crashed. | 627 // Indicates if the tab is considered crashed. |
620 base::TerminationStatus crashed_status_; | 628 base::TerminationStatus crashed_status_; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 // Type of view this WebContents is displaying. | 731 // Type of view this WebContents is displaying. |
724 content::ViewType view_type_; | 732 content::ViewType view_type_; |
725 | 733 |
726 // Color chooser that was opened by this tab. | 734 // Color chooser that was opened by this tab. |
727 content::ColorChooser* color_chooser_; | 735 content::ColorChooser* color_chooser_; |
728 | 736 |
729 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 737 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
730 }; | 738 }; |
731 | 739 |
732 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 740 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |