| 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_web_contents_observer.h" | |
| 18 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.h" | 17 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.h" |
| 19 #include "content/browser/web_contents/navigation_controller_impl.h" | 18 #include "content/browser/web_contents/navigation_controller_impl.h" |
| 20 #include "content/browser/web_contents/render_view_host_manager.h" | 19 #include "content/browser/web_contents/render_view_host_manager.h" |
| 21 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
| 22 #include "content/public/browser/notification_observer.h" | 21 #include "content/public/browser/notification_observer.h" |
| 23 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
| 24 #include "content/public/browser/render_view_host_delegate.h" | 23 #include "content/public/browser/render_view_host_delegate.h" |
| 25 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
| 26 #include "content/public/common/renderer_preferences.h" | 25 #include "content/public/common/renderer_preferences.h" |
| 27 #include "net/base/load_states.h" | 26 #include "net/base/load_states.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 } | 116 } |
| 118 | 117 |
| 119 void set_opener_web_ui_type(content::WebUI::TypeID opener_web_ui_type) { | 118 void set_opener_web_ui_type(content::WebUI::TypeID opener_web_ui_type) { |
| 120 opener_web_ui_type_ = opener_web_ui_type; | 119 opener_web_ui_type_ = opener_web_ui_type; |
| 121 } | 120 } |
| 122 | 121 |
| 123 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const { | 122 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const { |
| 124 return java_bridge_dispatcher_host_manager_.get(); | 123 return java_bridge_dispatcher_host_manager_.get(); |
| 125 } | 124 } |
| 126 | 125 |
| 127 content::BrowserPluginWebContentsObserver* | |
| 128 browser_plugin_web_contents_observer() const { | |
| 129 return browser_plugin_web_contents_observer_.get(); | |
| 130 } | |
| 131 | |
| 132 // Like GetController from WebContents, but returns the concrete object. | 126 // Like GetController from WebContents, but returns the concrete object. |
| 133 NavigationControllerImpl& GetControllerImpl(); | 127 NavigationControllerImpl& GetControllerImpl(); |
| 134 | 128 |
| 135 // Expose the render manager for testing. | 129 // Expose the render manager for testing. |
| 136 RenderViewHostManager* GetRenderManagerForTesting(); | 130 RenderViewHostManager* GetRenderManagerForTesting(); |
| 137 | 131 |
| 138 // content::WebContents ------------------------------------------------------ | 132 // content::WebContents ------------------------------------------------------ |
| 139 virtual const base::PropertyBag* GetPropertyBag() const OVERRIDE; | 133 virtual const base::PropertyBag* GetPropertyBag() const OVERRIDE; |
| 140 virtual base::PropertyBag* GetPropertyBag() OVERRIDE; | 134 virtual base::PropertyBag* GetPropertyBag() OVERRIDE; |
| 141 virtual content::WebContentsDelegate* GetDelegate() OVERRIDE; | 135 virtual content::WebContentsDelegate* GetDelegate() OVERRIDE; |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 // Helper classes ------------------------------------------------------------ | 581 // Helper classes ------------------------------------------------------------ |
| 588 | 582 |
| 589 // Manages creation and swapping of render views. | 583 // Manages creation and swapping of render views. |
| 590 RenderViewHostManager render_manager_; | 584 RenderViewHostManager render_manager_; |
| 591 | 585 |
| 592 // Manages injecting Java objects into all RenderViewHosts associated with | 586 // Manages injecting Java objects into all RenderViewHosts associated with |
| 593 // this WebContentsImpl. | 587 // this WebContentsImpl. |
| 594 scoped_ptr<JavaBridgeDispatcherHostManager> | 588 scoped_ptr<JavaBridgeDispatcherHostManager> |
| 595 java_bridge_dispatcher_host_manager_; | 589 java_bridge_dispatcher_host_manager_; |
| 596 | 590 |
| 597 scoped_ptr<content::BrowserPluginWebContentsObserver> | |
| 598 browser_plugin_web_contents_observer_; | |
| 599 // SavePackage, lazily created. | 591 // SavePackage, lazily created. |
| 600 scoped_refptr<SavePackage> save_package_; | 592 scoped_refptr<SavePackage> save_package_; |
| 601 | 593 |
| 602 // Data for loading state ---------------------------------------------------- | 594 // Data for loading state ---------------------------------------------------- |
| 603 | 595 |
| 604 // Indicates whether we're currently loading a resource. | 596 // Indicates whether we're currently loading a resource. |
| 605 bool is_loading_; | 597 bool is_loading_; |
| 606 | 598 |
| 607 // Indicates if the tab is considered crashed. | 599 // Indicates if the tab is considered crashed. |
| 608 base::TerminationStatus crashed_status_; | 600 base::TerminationStatus crashed_status_; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 // Type of view this WebContents is displaying. | 703 // Type of view this WebContents is displaying. |
| 712 content::ViewType view_type_; | 704 content::ViewType view_type_; |
| 713 | 705 |
| 714 // Color chooser that was opened by this tab. | 706 // Color chooser that was opened by this tab. |
| 715 content::ColorChooser* color_chooser_; | 707 content::ColorChooser* color_chooser_; |
| 716 | 708 |
| 717 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 709 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
| 718 }; | 710 }; |
| 719 | 711 |
| 720 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 712 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |