Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "chrome/browser/renderer_host/render_view_host.h" | 10 #include "chrome/browser/renderer_host/render_view_host.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 | 179 |
| 180 private: | 180 private: |
| 181 friend class TestWebContents; | 181 friend class TestWebContents; |
| 182 | 182 |
| 183 // Returns whether this tab should transition to a new renderer for | 183 // Returns whether this tab should transition to a new renderer for |
| 184 // cross-site URLs. Enabled unless we see the --process-per-tab command line | 184 // cross-site URLs. Enabled unless we see the --process-per-tab command line |
| 185 // switch. Can be overridden in unit tests. | 185 // switch. Can be overridden in unit tests. |
| 186 bool ShouldTransitionCrossSite(); | 186 bool ShouldTransitionCrossSite(); |
| 187 | 187 |
| 188 // Returns true if the two navigation entries are incompatible in some way | 188 // Returns true if the two navigation entries are incompatible in some way |
| 189 // other than site instances. This will cause us to swap RenderViewHosts even | 189 // other than site instances. This will cause us to swap RenderViewHosts |
| 190 // if the site instances are the same. Either of the entries may be NULL. | 190 // (and hence RenderProcessHosts) even if the site instance would otherwise |
| 191 bool ShouldSwapRenderViewsForNavigation( | 191 // be the same. It also forces new SiteInstances for these transitions. |
|
Charlie Reis
2009/04/16 22:00:56
"new SiteInstances and BrowsingInstances for these
| |
| 192 // Either of the entries may be NULL. | |
| 193 bool ShouldSwapProcessesForNavigation( | |
| 192 const NavigationEntry* cur_entry, | 194 const NavigationEntry* cur_entry, |
| 193 const NavigationEntry* new_entry) const; | 195 const NavigationEntry* new_entry) const; |
| 194 | 196 |
| 195 // Returns an appropriate SiteInstance object for the given NavigationEntry, | 197 // Returns an appropriate SiteInstance object for the given NavigationEntry, |
| 196 // possibly reusing the current SiteInstance. | 198 // possibly reusing the current SiteInstance. |
| 197 // Never called if --process-per-tab is used. | 199 // Never called if --process-per-tab is used. |
| 198 SiteInstance* GetSiteInstanceForEntry(const NavigationEntry& entry, | 200 SiteInstance* GetSiteInstanceForEntry(const NavigationEntry& entry, |
| 199 SiteInstance* curr_instance); | 201 SiteInstance* curr_instance); |
| 200 | 202 |
| 201 // Helper method to create a pending RenderViewHost for a cross-site | 203 // Helper method to create a pending RenderViewHost for a cross-site |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 252 }; | 254 }; |
| 253 | 255 |
| 254 // The "details" for a NOTIFY_RENDER_VIEW_HOST_CHANGED notification. The old | 256 // The "details" for a NOTIFY_RENDER_VIEW_HOST_CHANGED notification. The old |
| 255 // host can be NULL when the first RenderViewHost is set. | 257 // host can be NULL when the first RenderViewHost is set. |
| 256 struct RenderViewHostSwitchedDetails { | 258 struct RenderViewHostSwitchedDetails { |
| 257 RenderViewHost* old_host; | 259 RenderViewHost* old_host; |
| 258 RenderViewHost* new_host; | 260 RenderViewHost* new_host; |
| 259 }; | 261 }; |
| 260 | 262 |
| 261 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ | 263 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ |
| OLD | NEW |