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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 // Unsets the currently showing interstitial. | 109 // Unsets the currently showing interstitial. |
110 void remove_interstitial_page() { | 110 void remove_interstitial_page() { |
111 render_manager_.remove_interstitial_page(); | 111 render_manager_.remove_interstitial_page(); |
112 } | 112 } |
113 | 113 |
114 void set_opener_web_ui_type(content::WebUI::TypeID opener_web_ui_type) { | 114 void set_opener_web_ui_type(content::WebUI::TypeID opener_web_ui_type) { |
115 opener_web_ui_type_ = opener_web_ui_type; | 115 opener_web_ui_type_ = opener_web_ui_type; |
116 } | 116 } |
117 | 117 |
| 118 void set_has_opener(bool has_opener) { |
| 119 has_opener_ = has_opener; |
| 120 } |
| 121 |
118 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const { | 122 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const { |
119 return java_bridge_dispatcher_host_manager_.get(); | 123 return java_bridge_dispatcher_host_manager_.get(); |
120 } | 124 } |
121 | 125 |
122 // Like GetController from WebContents, but returns the concrete object. | 126 // Like GetController from WebContents, but returns the concrete object. |
123 NavigationControllerImpl& GetControllerImpl(); | 127 NavigationControllerImpl& GetControllerImpl(); |
124 | 128 |
125 // Expose the render manager for testing. | 129 // Expose the render manager for testing. |
126 RenderViewHostManager* GetRenderManagerForTesting(); | 130 RenderViewHostManager* GetRenderManagerForTesting(); |
127 | 131 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 virtual void ViewSource() OVERRIDE; | 215 virtual void ViewSource() OVERRIDE; |
212 virtual void ViewFrameSource(const GURL& url, | 216 virtual void ViewFrameSource(const GURL& url, |
213 const std::string& content_state) OVERRIDE; | 217 const std::string& content_state) OVERRIDE; |
214 virtual int GetMinimumZoomPercent() const OVERRIDE; | 218 virtual int GetMinimumZoomPercent() const OVERRIDE; |
215 virtual int GetMaximumZoomPercent() const OVERRIDE; | 219 virtual int GetMaximumZoomPercent() const OVERRIDE; |
216 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 220 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
217 virtual int GetContentRestrictions() const OVERRIDE; | 221 virtual int GetContentRestrictions() const OVERRIDE; |
218 virtual content::WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; | 222 virtual content::WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; |
219 virtual content::WebUI* GetWebUIForCurrentState() OVERRIDE; | 223 virtual content::WebUI* GetWebUIForCurrentState() OVERRIDE; |
220 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; | 224 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; |
| 225 virtual bool HasOpener() const OVERRIDE; |
221 | 226 |
222 // Implementation of PageNavigator. | 227 // Implementation of PageNavigator. |
223 virtual content::WebContents* OpenURL( | 228 virtual content::WebContents* OpenURL( |
224 const content::OpenURLParams& params) OVERRIDE; | 229 const content::OpenURLParams& params) OVERRIDE; |
225 | 230 |
226 // RenderViewHostDelegate ---------------------------------------------------- | 231 // RenderViewHostDelegate ---------------------------------------------------- |
227 | 232 |
228 virtual content::RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE; | 233 virtual content::RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE; |
229 virtual content::RenderViewHostDelegate::RendererManagement* | 234 virtual content::RenderViewHostDelegate::RendererManagement* |
230 GetRendererManagementDelegate() OVERRIDE; | 235 GetRendererManagementDelegate() OVERRIDE; |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 // The intrinsic size of the page. | 660 // The intrinsic size of the page. |
656 gfx::Size preferred_size_; | 661 gfx::Size preferred_size_; |
657 | 662 |
658 // Content restrictions, used to disable print/copy etc based on content's | 663 // Content restrictions, used to disable print/copy etc based on content's |
659 // (full-page plugins for now only) permissions. | 664 // (full-page plugins for now only) permissions. |
660 int content_restrictions_; | 665 int content_restrictions_; |
661 | 666 |
662 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. | 667 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. |
663 content::ViewType view_type_; | 668 content::ViewType view_type_; |
664 | 669 |
| 670 // Is there an opener associated with this? |
| 671 bool has_opener_; |
| 672 |
665 DISALLOW_COPY_AND_ASSIGN(TabContents); | 673 DISALLOW_COPY_AND_ASSIGN(TabContents); |
666 }; | 674 }; |
667 | 675 |
668 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 676 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
OLD | NEW |