OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/logging.h" | |
11 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
12 #include "chrome/browser/renderer_host/render_view_host_delegate.h" | 11 #include "chrome/browser/renderer_host/render_view_host_delegate.h" |
13 #include "chrome/common/notification_registrar.h" | 12 #include "chrome/common/notification_registrar.h" |
14 #include "chrome/common/notification_observer.h" | 13 #include "chrome/common/notification_observer.h" |
15 | 14 |
16 class DOMUI; | 15 class DOMUI; |
17 class InterstitialPage; | 16 class InterstitialPage; |
18 class NavigationController; | 17 class NavigationController; |
19 class NavigationEntry; | 18 class NavigationEntry; |
20 class Profile; | 19 class Profile; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // privileges from the originating renderer. | 138 // privileges from the originating renderer. |
140 void SetDOMUIPostCommit(DOMUI* dom_ui); | 139 void SetDOMUIPostCommit(DOMUI* dom_ui); |
141 | 140 |
142 // Called when a provisional load on the given renderer is aborted. | 141 // Called when a provisional load on the given renderer is aborted. |
143 void RendererAbortedProvisionalLoad(RenderViewHost* render_view_host); | 142 void RendererAbortedProvisionalLoad(RenderViewHost* render_view_host); |
144 | 143 |
145 // Sets the passed passed interstitial as the currently showing interstitial. | 144 // Sets the passed passed interstitial as the currently showing interstitial. |
146 // |interstitial_page| should be non NULL (use the remove_interstitial_page | 145 // |interstitial_page| should be non NULL (use the remove_interstitial_page |
147 // method to unset the interstitial) and no interstitial page should be set | 146 // method to unset the interstitial) and no interstitial page should be set |
148 // when there is already a non NULL interstitial page set. | 147 // when there is already a non NULL interstitial page set. |
149 void set_interstitial_page(InterstitialPage* interstitial_page) { | 148 void set_interstitial_page(InterstitialPage* interstitial_page); |
150 DCHECK(!interstitial_page_ && interstitial_page); | |
151 interstitial_page_ = interstitial_page; | |
152 } | |
153 | 149 |
154 // Unsets the currently showing interstitial. | 150 // Unsets the currently showing interstitial. |
155 void remove_interstitial_page() { | 151 void remove_interstitial_page(); |
156 DCHECK(interstitial_page_); | |
157 interstitial_page_ = NULL; | |
158 } | |
159 | 152 |
160 // Returns the currently showing interstitial, NULL if no interstitial is | 153 // Returns the currently showing interstitial, NULL if no interstitial is |
161 // showing. | 154 // showing. |
162 InterstitialPage* interstitial_page() const { | 155 InterstitialPage* interstitial_page() const { |
163 return interstitial_page_; | 156 return interstitial_page_; |
164 } | 157 } |
165 | 158 |
166 // RenderViewHostDelegate::RendererManagement implementation. | 159 // RenderViewHostDelegate::RendererManagement implementation. |
167 virtual void ShouldClosePage(bool for_cross_site_transition, bool proceed); | 160 virtual void ShouldClosePage(bool for_cross_site_transition, bool proceed); |
168 virtual void OnCrossSiteResponse(int new_render_process_host_id, | 161 virtual void OnCrossSiteResponse(int new_render_process_host_id, |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 }; | 250 }; |
258 | 251 |
259 // The "details" for a NOTIFY_RENDER_VIEW_HOST_CHANGED notification. The old | 252 // The "details" for a NOTIFY_RENDER_VIEW_HOST_CHANGED notification. The old |
260 // host can be NULL when the first RenderViewHost is set. | 253 // host can be NULL when the first RenderViewHost is set. |
261 struct RenderViewHostSwitchedDetails { | 254 struct RenderViewHostSwitchedDetails { |
262 RenderViewHost* old_host; | 255 RenderViewHost* old_host; |
263 RenderViewHost* new_host; | 256 RenderViewHost* new_host; |
264 }; | 257 }; |
265 | 258 |
266 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ | 259 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ |
OLD | NEW |