OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // these may change over time. | 120 // these may change over time. |
121 RenderProcessHost* GetRenderProcessHost() const; | 121 RenderProcessHost* GetRenderProcessHost() const; |
122 RenderViewHost* render_view_host() const { | 122 RenderViewHost* render_view_host() const { |
123 return render_manager_.current_host(); | 123 return render_manager_.current_host(); |
124 } | 124 } |
125 | 125 |
126 WebUI* committed_web_ui() const { | 126 WebUI* committed_web_ui() const { |
127 return render_manager_.web_ui(); | 127 return render_manager_.web_ui(); |
128 } | 128 } |
129 | 129 |
| 130 // Returns the committed WebUI if one exists, otherwise the pending one. |
| 131 // Callers who want to use the pending WebUI for the pending navigation entry |
| 132 // should use GetWebUIForCurrentState instead. |
130 WebUI* web_ui() const { | 133 WebUI* web_ui() const { |
131 return render_manager_.web_ui() ? render_manager_.web_ui() | 134 return render_manager_.web_ui() ? render_manager_.web_ui() |
132 : render_manager_.pending_web_ui(); | 135 : render_manager_.pending_web_ui(); |
133 } | 136 } |
134 | 137 |
135 // Returns the currently active RenderWidgetHostView. This may change over | 138 // Returns the currently active RenderWidgetHostView. This may change over |
136 // time and can be NULL (during setup and teardown). | 139 // time and can be NULL (during setup and teardown). |
137 RenderWidgetHostView* GetRenderWidgetHostView() const { | 140 RenderWidgetHostView* GetRenderWidgetHostView() const { |
138 return render_manager_.GetRenderWidgetHostView(); | 141 return render_manager_.GetRenderWidgetHostView(); |
139 } | 142 } |
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 ObserverList<TabContentsObserver> observers_; | 847 ObserverList<TabContentsObserver> observers_; |
845 | 848 |
846 // Content restrictions, used to disable print/copy etc based on content's | 849 // Content restrictions, used to disable print/copy etc based on content's |
847 // (full-page plugins for now only) permissions. | 850 // (full-page plugins for now only) permissions. |
848 int content_restrictions_; | 851 int content_restrictions_; |
849 | 852 |
850 DISALLOW_COPY_AND_ASSIGN(TabContents); | 853 DISALLOW_COPY_AND_ASSIGN(TabContents); |
851 }; | 854 }; |
852 | 855 |
853 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 856 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
OLD | NEW |