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_TAB_CONTENTS_TAB_CONTENTS_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <map> | 10 #include <map> |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 // Unsets the currently showing interstitial. | 107 // Unsets the currently showing interstitial. |
108 void remove_interstitial_page() { | 108 void remove_interstitial_page() { |
109 render_manager_.remove_interstitial_page(); | 109 render_manager_.remove_interstitial_page(); |
110 } | 110 } |
111 | 111 |
112 void set_opener_web_ui_type(content::WebUI::TypeID opener_web_ui_type) { | 112 void set_opener_web_ui_type(content::WebUI::TypeID opener_web_ui_type) { |
113 opener_web_ui_type_ = opener_web_ui_type; | 113 opener_web_ui_type_ = opener_web_ui_type; |
114 } | 114 } |
115 | 115 |
| 116 void set_opener_origin(const GURL& opener_origin) { |
| 117 opener_origin_ = opener_origin; |
| 118 } |
| 119 |
116 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const { | 120 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const { |
117 return java_bridge_dispatcher_host_manager_.get(); | 121 return java_bridge_dispatcher_host_manager_.get(); |
118 } | 122 } |
119 | 123 |
120 // Like GetController from WebContents, but returns the concrete object. | 124 // Like GetController from WebContents, but returns the concrete object. |
121 NavigationControllerImpl& GetControllerImpl(); | 125 NavigationControllerImpl& GetControllerImpl(); |
122 | 126 |
123 // Expose the render manager for testing. | 127 // Expose the render manager for testing. |
124 RenderViewHostManager* GetRenderManagerForTesting(); | 128 RenderViewHostManager* GetRenderManagerForTesting(); |
125 | 129 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 virtual void ViewSource() OVERRIDE; | 212 virtual void ViewSource() OVERRIDE; |
209 virtual void ViewFrameSource(const GURL& url, | 213 virtual void ViewFrameSource(const GURL& url, |
210 const std::string& content_state) OVERRIDE; | 214 const std::string& content_state) OVERRIDE; |
211 virtual int GetMinimumZoomPercent() const OVERRIDE; | 215 virtual int GetMinimumZoomPercent() const OVERRIDE; |
212 virtual int GetMaximumZoomPercent() const OVERRIDE; | 216 virtual int GetMaximumZoomPercent() const OVERRIDE; |
213 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 217 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
214 virtual int GetContentRestrictions() const OVERRIDE; | 218 virtual int GetContentRestrictions() const OVERRIDE; |
215 virtual content::WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; | 219 virtual content::WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; |
216 virtual content::WebUI* GetWebUIForCurrentState() OVERRIDE; | 220 virtual content::WebUI* GetWebUIForCurrentState() OVERRIDE; |
217 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; | 221 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; |
| 222 virtual const GURL& GetOpenerOrigin() const OVERRIDE; |
218 | 223 |
219 // Implementation of PageNavigator. | 224 // Implementation of PageNavigator. |
220 virtual content::WebContents* OpenURL( | 225 virtual content::WebContents* OpenURL( |
221 const content::OpenURLParams& params) OVERRIDE; | 226 const content::OpenURLParams& params) OVERRIDE; |
222 | 227 |
223 // RenderViewHostDelegate ---------------------------------------------------- | 228 // RenderViewHostDelegate ---------------------------------------------------- |
224 | 229 |
225 virtual content::RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE; | 230 virtual content::RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE; |
226 virtual content::RenderViewHostDelegate::RendererManagement* | 231 virtual content::RenderViewHostDelegate::RendererManagement* |
227 GetRendererManagementDelegate() OVERRIDE; | 232 GetRendererManagementDelegate() OVERRIDE; |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 // The intrinsic size of the page. | 648 // The intrinsic size of the page. |
644 gfx::Size preferred_size_; | 649 gfx::Size preferred_size_; |
645 | 650 |
646 // Content restrictions, used to disable print/copy etc based on content's | 651 // Content restrictions, used to disable print/copy etc based on content's |
647 // (full-page plugins for now only) permissions. | 652 // (full-page plugins for now only) permissions. |
648 int content_restrictions_; | 653 int content_restrictions_; |
649 | 654 |
650 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. | 655 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. |
651 content::ViewType view_type_; | 656 content::ViewType view_type_; |
652 | 657 |
| 658 // The origin of the opener. |
| 659 GURL opener_origin_; |
| 660 |
653 DISALLOW_COPY_AND_ASSIGN(TabContents); | 661 DISALLOW_COPY_AND_ASSIGN(TabContents); |
654 }; | 662 }; |
655 | 663 |
656 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 664 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
OLD | NEW |