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_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
155 void SetIsLoading(bool is_loading); | 155 void SetIsLoading(bool is_loading); |
156 | 156 |
157 // Whether to close the tab or not when there is a hang during an unload | 157 // Whether to close the tab or not when there is a hang during an unload |
158 // handler. If we are mid-crosssite navigation, then we should proceed | 158 // handler. If we are mid-crosssite navigation, then we should proceed |
159 // with the navigation instead of closing the tab. | 159 // with the navigation instead of closing the tab. |
160 bool ShouldCloseTabOnUnresponsiveRenderer(); | 160 bool ShouldCloseTabOnUnresponsiveRenderer(); |
161 | 161 |
162 // Called when a renderer's main frame navigates. | 162 // Called when a renderer's main frame navigates. |
163 void DidNavigateMainFrame(content::RenderViewHost* render_view_host); | 163 void DidNavigateMainFrame(content::RenderViewHost* render_view_host); |
164 | 164 |
165 // Called when a renderer has navigated and its frame tree is updated. | |
Charlie Reis
2012/08/22 22:08:34
nit: and when its frame tree
nasko
2012/08/23 21:55:53
Done.
| |
166 void DidUpdateFrameTree(content::RenderViewHost* render_view_host); | |
167 | |
165 // Helper method to create a RenderViewHost. If |swapped_out| is true, it | 168 // Helper method to create a RenderViewHost. If |swapped_out| is true, it |
166 // will be initially placed on the swapped out hosts list. Otherwise, it | 169 // will be initially placed on the swapped out hosts list. Otherwise, it |
167 // will be used for a pending cross-site navigation. | 170 // will be used for a pending cross-site navigation. |
168 int CreateRenderView(content::SiteInstance* instance, | 171 int CreateRenderView(content::SiteInstance* instance, |
169 int opener_route_id, | 172 int opener_route_id, |
170 bool swapped_out); | 173 bool swapped_out); |
171 | 174 |
172 // Set the WebUI after committing a page load. This is useful for navigations | 175 // Set the WebUI after committing a page load. This is useful for navigations |
173 // initiated from a renderer, where we want to give the new renderer WebUI | 176 // initiated from a renderer, where we want to give the new renderer WebUI |
174 // privileges from the originating renderer. | 177 // privileges from the originating renderer. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 const content::NotificationDetails& details) OVERRIDE; | 216 const content::NotificationDetails& details) OVERRIDE; |
214 | 217 |
215 // Called when a RenderViewHost is about to be deleted. | 218 // Called when a RenderViewHost is about to be deleted. |
216 void RenderViewDeleted(content::RenderViewHost* rvh); | 219 void RenderViewDeleted(content::RenderViewHost* rvh); |
217 | 220 |
218 // Returns whether the given RenderViewHost is on the list of swapped out | 221 // Returns whether the given RenderViewHost is on the list of swapped out |
219 // RenderViewHosts. | 222 // RenderViewHosts. |
220 bool IsSwappedOut(content::RenderViewHost* rvh); | 223 bool IsSwappedOut(content::RenderViewHost* rvh); |
221 | 224 |
222 // Returns the swapped out RenderViewHost for the given SiteInstance, if any. | 225 // Returns the swapped out RenderViewHost for the given SiteInstance, if any. |
223 content::RenderViewHost* GetSwappedOutRenderViewHost( | 226 content::RenderViewHostImpl* GetSwappedOutRenderViewHost( |
224 content::SiteInstance* instance); | 227 content::SiteInstance* instance); |
225 | 228 |
226 private: | 229 private: |
227 friend class content::TestWebContents; | 230 friend class content::TestWebContents; |
228 friend class RenderViewHostManagerTest; | 231 friend class RenderViewHostManagerTest; |
229 | 232 |
230 // Returns whether this tab should transition to a new renderer for | 233 // Returns whether this tab should transition to a new renderer for |
231 // cross-site URLs. Enabled unless we see the --process-per-tab command line | 234 // cross-site URLs. Enabled unless we see the --process-per-tab command line |
232 // switch. Can be overridden in unit tests. | 235 // switch. Can be overridden in unit tests. |
233 bool ShouldTransitionCrossSite(); | 236 bool ShouldTransitionCrossSite(); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
317 // The intersitial page currently shown if any, not own by this class | 320 // The intersitial page currently shown if any, not own by this class |
318 // (the InterstitialPage is self-owned, it deletes itself when hidden). | 321 // (the InterstitialPage is self-owned, it deletes itself when hidden). |
319 InterstitialPageImpl* interstitial_page_; | 322 InterstitialPageImpl* interstitial_page_; |
320 | 323 |
321 content::NotificationRegistrar registrar_; | 324 content::NotificationRegistrar registrar_; |
322 | 325 |
323 DISALLOW_COPY_AND_ASSIGN(RenderViewHostManager); | 326 DISALLOW_COPY_AND_ASSIGN(RenderViewHostManager); |
324 }; | 327 }; |
325 | 328 |
326 #endif // CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ | 329 #endif // CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ |
OLD | NEW |