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