summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/render_view_host_manager.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 18:04:59 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 18:04:59 +0000
commit6de74456d80f1f458509ec61c353b7ba2c728b84 (patch)
tree51912c23a1755d3aa8be422bfb7777fa7ef46860 /chrome/browser/tab_contents/render_view_host_manager.h
parent24d2b8f01cca7f68cdb526c03a15f75a7feec35b (diff)
downloadchromium_src-6de74456d80f1f458509ec61c353b7ba2c728b84.zip
chromium_src-6de74456d80f1f458509ec61c353b7ba2c728b84.tar.gz
chromium_src-6de74456d80f1f458509ec61c353b7ba2c728b84.tar.bz2
Delete the ViewSourceTabContents.
This removes all the tab contents type stuff for view source mode. The RenderViewHostManager now automatically switches RenderViews when we turn view source mode on or off to get the desired effect. I also moved some instances of hardcoded schemes into chrome_constants.h, and renamed RendererCreated/Ready/Gone to RenderViewCreated/Ready/Gone to reflect what they actually mean. Review URL: http://codereview.chromium.org/28089 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10346 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/render_view_host_manager.h')
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_manager.h b/chrome/browser/tab_contents/render_view_host_manager.h
index 268b298..160ecff 100644
--- a/chrome/browser/tab_contents/render_view_host_manager.h
+++ b/chrome/browser/tab_contents/render_view_host_manager.h
@@ -42,11 +42,16 @@ class RenderViewHostManager : public NotificationObserver {
bool proceed, bool* proceed_to_fire_unload) = 0;
virtual void DidStartLoadingFromRenderManager(
RenderViewHost* render_view_host, int32 page_id) = 0;
- virtual void RendererGoneFromRenderManager(
+ virtual void RenderViewGoneFromRenderManager(
RenderViewHost* render_view_host) = 0;
virtual void UpdateRenderViewSizeForRenderManager() = 0;
virtual void NotifySwappedFromRenderManager() = 0;
virtual NavigationController* GetControllerForRenderManager() = 0;
+
+ // Returns the navigation entry of the current navigation, or NULL if there
+ // is none.
+ virtual NavigationEntry*
+ GetLastCommittedNavigationEntryForRenderManager() = 0;
};
// The factory is optional. It is used by unit tests to supply custom render
@@ -167,6 +172,13 @@ class RenderViewHostManager : public NotificationObserver {
// switch. Can be overridden in unit tests.
bool ShouldTransitionCrossSite();
+ // Returns true if the two navigation entries are incompatible in some way
+ // other than site instances. This will cause us to swap RenderViewHosts even
+ // if the site instances are the same. Either of the entries may be NULL.
+ bool ShouldSwapRenderViewsForNavigation(
+ const NavigationEntry* cur_entry,
+ const NavigationEntry* new_entry) const;
+
// Returns an appropriate SiteInstance object for the given NavigationEntry,
// possibly reusing the current SiteInstance.
// Never called if --process-per-tab is used.
@@ -200,7 +212,9 @@ class RenderViewHostManager : public NotificationObserver {
// Our delegate, not owned by us. Guaranteed non-NULL.
Delegate* delegate_;
- // Whether a cross-site request is pending (in the new process model).
+ // Whether a navigation requiring different RenderView's is pending. This is
+ // either cross-site request is (in the new process model), or when required
+ // for the view type (like view source versus not).
bool cross_navigation_pending_;
// Allows tests to create their own render view host types.