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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
206 virtual void ViewSource() OVERRIDE; | 210 virtual void ViewSource() OVERRIDE; |
207 virtual void ViewFrameSource(const GURL& url, | 211 virtual void ViewFrameSource(const GURL& url, |
208 const std::string& content_state) OVERRIDE; | 212 const std::string& content_state) OVERRIDE; |
209 virtual int GetMinimumZoomPercent() const OVERRIDE; | 213 virtual int GetMinimumZoomPercent() const OVERRIDE; |
210 virtual int GetMaximumZoomPercent() const OVERRIDE; | 214 virtual int GetMaximumZoomPercent() const OVERRIDE; |
211 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 215 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
212 virtual int GetContentRestrictions() const OVERRIDE; | 216 virtual int GetContentRestrictions() const OVERRIDE; |
213 virtual content::WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; | 217 virtual content::WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; |
214 virtual content::WebUI* GetWebUIForCurrentState() OVERRIDE; | 218 virtual content::WebUI* GetWebUIForCurrentState() OVERRIDE; |
215 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; | 219 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; |
220 virtual const GURL& GetOpenerOrigin() const OVERRIDE; | |
216 | 221 |
217 // Implementation of PageNavigator. | 222 // Implementation of PageNavigator. |
218 virtual content::WebContents* OpenURL( | 223 virtual content::WebContents* OpenURL( |
219 const content::OpenURLParams& params) OVERRIDE; | 224 const content::OpenURLParams& params) OVERRIDE; |
220 | 225 |
221 // RenderViewHostDelegate ---------------------------------------------------- | 226 // RenderViewHostDelegate ---------------------------------------------------- |
222 | 227 |
223 virtual content::RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE; | 228 virtual content::RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE; |
224 virtual content::RenderViewHostDelegate::RendererManagement* | 229 virtual content::RenderViewHostDelegate::RendererManagement* |
225 GetRendererManagementDelegate() OVERRIDE; | 230 GetRendererManagementDelegate() OVERRIDE; |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
642 // The intrinsic size of the page. | 647 // The intrinsic size of the page. |
643 gfx::Size preferred_size_; | 648 gfx::Size preferred_size_; |
644 | 649 |
645 // Content restrictions, used to disable print/copy etc based on content's | 650 // Content restrictions, used to disable print/copy etc based on content's |
646 // (full-page plugins for now only) permissions. | 651 // (full-page plugins for now only) permissions. |
647 int content_restrictions_; | 652 int content_restrictions_; |
648 | 653 |
649 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. | 654 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. |
650 content::ViewType view_type_; | 655 content::ViewType view_type_; |
651 | 656 |
657 // The origin of the opener. | |
Charlie Reis
2012/03/01 19:06:03
I don't quite follow this. The origin of the open
cbentzel
2012/03/01 22:18:53
I thought opener was associated with a browsing co
Charlie Reis
2012/03/01 22:24:38
Correct. The opener is a browser context, like a
| |
658 GURL opener_origin_; | |
659 | |
652 DISALLOW_COPY_AND_ASSIGN(TabContents); | 660 DISALLOW_COPY_AND_ASSIGN(TabContents); |
653 }; | 661 }; |
654 | 662 |
655 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 663 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
OLD | NEW |