| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } | 120 } |
| 120 | 121 |
| 121 void set_opener_web_ui_type(content::WebUI::TypeID opener_web_ui_type) { | 122 void set_opener_web_ui_type(content::WebUI::TypeID opener_web_ui_type) { |
| 122 opener_web_ui_type_ = opener_web_ui_type; | 123 opener_web_ui_type_ = opener_web_ui_type; |
| 123 } | 124 } |
| 124 | 125 |
| 125 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const { | 126 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const { |
| 126 return java_bridge_dispatcher_host_manager_.get(); | 127 return java_bridge_dispatcher_host_manager_.get(); |
| 127 } | 128 } |
| 128 | 129 |
| 130 content::BrowserPluginHost* browser_plugin_host() const { |
| 131 return browser_plugin_host_.get(); |
| 132 } |
| 133 |
| 129 // Like GetController from WebContents, but returns the concrete object. | 134 // Like GetController from WebContents, but returns the concrete object. |
| 130 NavigationControllerImpl& GetControllerImpl(); | 135 NavigationControllerImpl& GetControllerImpl(); |
| 131 | 136 |
| 132 // Expose the render manager for testing. | 137 // Expose the render manager for testing. |
| 133 RenderViewHostManager* GetRenderManagerForTesting(); | 138 RenderViewHostManager* GetRenderManagerForTesting(); |
| 134 | 139 |
| 140 // Get the pending RenderViewHost during cross-process navigation. |
| 141 content::RenderViewHost* GetPendingRenderViewHost() const; |
| 142 |
| 135 // content::WebContents ------------------------------------------------------ | 143 // content::WebContents ------------------------------------------------------ |
| 136 virtual const base::PropertyBag* GetPropertyBag() const OVERRIDE; | 144 virtual const base::PropertyBag* GetPropertyBag() const OVERRIDE; |
| 137 virtual base::PropertyBag* GetPropertyBag() OVERRIDE; | 145 virtual base::PropertyBag* GetPropertyBag() OVERRIDE; |
| 138 virtual content::WebContentsDelegate* GetDelegate() OVERRIDE; | 146 virtual content::WebContentsDelegate* GetDelegate() OVERRIDE; |
| 139 virtual void SetDelegate(content::WebContentsDelegate* delegate) OVERRIDE; | 147 virtual void SetDelegate(content::WebContentsDelegate* delegate) OVERRIDE; |
| 140 virtual content::NavigationController& GetController() OVERRIDE; | 148 virtual content::NavigationController& GetController() OVERRIDE; |
| 141 virtual const content::NavigationController& GetController() const OVERRIDE; | 149 virtual const content::NavigationController& GetController() const OVERRIDE; |
| 142 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; | 150 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; |
| 143 virtual void SetViewType(content::ViewType type) OVERRIDE; | 151 virtual void SetViewType(content::ViewType type) OVERRIDE; |
| 144 virtual content::ViewType GetViewType() const OVERRIDE; | 152 virtual content::ViewType GetViewType() const OVERRIDE; |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 // Helper classes ------------------------------------------------------------ | 600 // Helper classes ------------------------------------------------------------ |
| 593 | 601 |
| 594 // Manages creation and swapping of render views. | 602 // Manages creation and swapping of render views. |
| 595 RenderViewHostManager render_manager_; | 603 RenderViewHostManager render_manager_; |
| 596 | 604 |
| 597 // Manages injecting Java objects into all RenderViewHosts associated with | 605 // Manages injecting Java objects into all RenderViewHosts associated with |
| 598 // this WebContentsImpl. | 606 // this WebContentsImpl. |
| 599 scoped_ptr<JavaBridgeDispatcherHostManager> | 607 scoped_ptr<JavaBridgeDispatcherHostManager> |
| 600 java_bridge_dispatcher_host_manager_; | 608 java_bridge_dispatcher_host_manager_; |
| 601 | 609 |
| 610 // Manages the browser plugin instances hosted by this WebContents |
| 611 scoped_ptr<content::BrowserPluginHost> browser_plugin_host_; |
| 612 |
| 602 // SavePackage, lazily created. | 613 // SavePackage, lazily created. |
| 603 scoped_refptr<SavePackage> save_package_; | 614 scoped_refptr<SavePackage> save_package_; |
| 604 | 615 |
| 605 // Data for loading state ---------------------------------------------------- | 616 // Data for loading state ---------------------------------------------------- |
| 606 | 617 |
| 607 // Indicates whether we're currently loading a resource. | 618 // Indicates whether we're currently loading a resource. |
| 608 bool is_loading_; | 619 bool is_loading_; |
| 609 | 620 |
| 610 // Indicates if the tab is considered crashed. | 621 // Indicates if the tab is considered crashed. |
| 611 base::TerminationStatus crashed_status_; | 622 base::TerminationStatus crashed_status_; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 // Type of view this WebContents is displaying. | 725 // Type of view this WebContents is displaying. |
| 715 content::ViewType view_type_; | 726 content::ViewType view_type_; |
| 716 | 727 |
| 717 // Color chooser that was opened by this tab. | 728 // Color chooser that was opened by this tab. |
| 718 content::ColorChooser* color_chooser_; | 729 content::ColorChooser* color_chooser_; |
| 719 | 730 |
| 720 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 731 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
| 721 }; | 732 }; |
| 722 | 733 |
| 723 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 734 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |