| 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 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 virtual void ShouldClosePage(bool for_cross_site_transition, bool proceed); | 163 virtual void ShouldClosePage(bool for_cross_site_transition, bool proceed); |
| 164 virtual void OnCrossSiteResponse(int new_render_process_host_id, | 164 virtual void OnCrossSiteResponse(int new_render_process_host_id, |
| 165 int new_request_id); | 165 int new_request_id); |
| 166 virtual void OnCrossSiteNavigationCanceled(); | 166 virtual void OnCrossSiteNavigationCanceled(); |
| 167 | 167 |
| 168 // Called when a RenderViewHost is about to be deleted. | 168 // Called when a RenderViewHost is about to be deleted. |
| 169 void RenderViewDeleted(RenderViewHost* rvh); | 169 void RenderViewDeleted(RenderViewHost* rvh); |
| 170 | 170 |
| 171 private: | 171 private: |
| 172 friend class TestTabContents; | 172 friend class TestTabContents; |
| 173 friend class RenderViewHostManagerTest; |
| 173 | 174 |
| 174 // Returns whether this tab should transition to a new renderer for | 175 // Returns whether this tab should transition to a new renderer for |
| 175 // cross-site URLs. Enabled unless we see the --process-per-tab command line | 176 // cross-site URLs. Enabled unless we see the --process-per-tab command line |
| 176 // switch. Can be overridden in unit tests. | 177 // switch. Can be overridden in unit tests. |
| 177 bool ShouldTransitionCrossSite(); | 178 bool ShouldTransitionCrossSite(); |
| 178 | 179 |
| 179 // Returns true if the two navigation entries are incompatible in some way | 180 // Returns true if the two navigation entries are incompatible in some way |
| 180 // other than site instances. Cases where this can happen include DOM UI | 181 // other than site instances. Cases where this can happen include DOM UI |
| 181 // to regular web pages. It will cause us to swap RenderViewHosts (and hence | 182 // to regular web pages. It will cause us to swap RenderViewHosts (and hence |
| 182 // RenderProcessHosts) even if the site instance would otherwise be the same. | 183 // RenderProcessHosts) even if the site instance would otherwise be the same. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 }; | 253 }; |
| 253 | 254 |
| 254 // The "details" for a NOTIFY_RENDER_VIEW_HOST_CHANGED notification. The old | 255 // The "details" for a NOTIFY_RENDER_VIEW_HOST_CHANGED notification. The old |
| 255 // host can be NULL when the first RenderViewHost is set. | 256 // host can be NULL when the first RenderViewHost is set. |
| 256 struct RenderViewHostSwitchedDetails { | 257 struct RenderViewHostSwitchedDetails { |
| 257 RenderViewHost* old_host; | 258 RenderViewHost* old_host; |
| 258 RenderViewHost* new_host; | 259 RenderViewHost* new_host; |
| 259 }; | 260 }; |
| 260 | 261 |
| 261 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ | 262 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ |
| OLD | NEW |