| Index: content/browser/web_contents/render_view_host_manager.h
|
| diff --git a/content/browser/web_contents/render_view_host_manager.h b/content/browser/web_contents/render_view_host_manager.h
|
| index d178680c11a32877b0b637418d18cd1786b48c6d..d653a742f286b4ff5c0b849a1ad469f9f5490446 100644
|
| --- a/content/browser/web_contents/render_view_host_manager.h
|
| +++ b/content/browser/web_contents/render_view_host_manager.h
|
| @@ -166,6 +166,10 @@ class CONTENT_EXPORT RenderViewHostManager
|
| // with the navigation instead of closing the tab.
|
| bool ShouldCloseTabOnUnresponsiveRenderer();
|
|
|
| + // The RenderViewHost has been swapped out, so we should resume the pending
|
| + // network response and allow the pending RenderViewHost to commit.
|
| + void SwappedOut(RenderViewHost* render_view_host);
|
| +
|
| // Called when a renderer's main frame navigates.
|
| void DidNavigateMainFrame(RenderViewHost* render_view_host);
|
|
|
| @@ -206,8 +210,9 @@ class CONTENT_EXPORT RenderViewHostManager
|
| bool for_cross_site_transition,
|
| bool proceed,
|
| const base::TimeTicks& proceed_time) OVERRIDE;
|
| - virtual void OnCrossSiteResponse(int new_render_process_host_id,
|
| - int new_request_id) OVERRIDE;
|
| + virtual void OnCrossSiteResponse(
|
| + RenderViewHost* pending_render_view_host,
|
| + const GlobalRequestID& global_request_id) OVERRIDE;
|
|
|
| // NotificationObserver implementation.
|
| virtual void Observe(int type,
|
| @@ -224,10 +229,24 @@ class CONTENT_EXPORT RenderViewHostManager
|
| // Returns the swapped out RenderViewHost for the given SiteInstance, if any.
|
| RenderViewHostImpl* GetSwappedOutRenderViewHost(SiteInstance* instance);
|
|
|
| + // Runs the unload handler in the current page, when we know that a pending
|
| + // cross-process navigation is going to commit.
|
| + void SwapOutOldPage();
|
| +
|
| private:
|
| friend class RenderViewHostManagerTest;
|
| friend class TestWebContents;
|
|
|
| + // Tracks information about a navigation while a cross-process transition is
|
| + // in progress.
|
| + // TODO(creis): Add transfer navigation params for http://crbug.com/238331.
|
| + struct PendingNavigationParams {
|
| + PendingNavigationParams();
|
| + explicit PendingNavigationParams(const GlobalRequestID& global_request_id);
|
| +
|
| + GlobalRequestID global_request_id;
|
| + };
|
| +
|
| // Returns whether this tab should transition to a new renderer for
|
| // cross-site URLs. Enabled unless we see the --process-per-tab command line
|
| // switch. Can be overridden in unit tests.
|
| @@ -303,6 +322,9 @@ class CONTENT_EXPORT RenderViewHostManager
|
| // associated with the navigation.
|
| RenderViewHostImpl* pending_render_view_host_;
|
|
|
| + // Tracks information about any current pending cross-process navigation.
|
| + scoped_ptr<PendingNavigationParams> pending_nav_params_;
|
| +
|
| // If either of these is non-NULL, the pending navigation is to a chrome:
|
| // page. The scoped_ptr is used if pending_web_ui_ != web_ui_, the WeakPtr is
|
| // used for when they reference the same object. If either is non-NULL, the
|
|
|