Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index c4d84605e09f153528bdf987d7650bf9a4df1431..d10ff3826d26e5d772f11b38d12f5fb93081e05c 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -1115,7 +1115,6 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { |
IPC_MESSAGE_HANDLER(ViewMsg_RunFileChooserResponse, OnFileChooserResponse) |
IPC_MESSAGE_HANDLER(ViewMsg_SuppressDialogsUntilSwapOut, |
OnSuppressDialogsUntilSwapOut) |
- IPC_MESSAGE_HANDLER(ViewMsg_SwapOut, OnSwapOut) |
IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage) |
IPC_MESSAGE_HANDLER(ViewMsg_ThemeChanged, OnThemeChanged) |
IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) |
@@ -3812,45 +3811,6 @@ void RenderViewImpl::OnSuppressDialogsUntilSwapOut() { |
suppress_dialogs_until_swap_out_ = true; |
} |
-void RenderViewImpl::OnSwapOut() { |
- // Only run unload if we're not swapped out yet, but send the ack either way. |
- if (!is_swapped_out_) { |
- // Swap this RenderView out so the tab can navigate to a page rendered by a |
- // different process. This involves running the unload handler and clearing |
- // the page. Once WasSwappedOut is called, we also allow this process to |
- // exit if there are no other active RenderViews in it. |
- |
- // Send an UpdateState message before we get swapped out. |
- SyncNavigationState(); |
- |
- // Synchronously run the unload handler before sending the ACK. |
- webview()->dispatchUnloadEvent(); |
- |
- // Swap out and stop sending any IPC messages that are not ACKs. |
- SetSwappedOut(true); |
- |
- // Now that we're swapped out and filtering IPC messages, stop loading to |
- // ensure that no other in-progress navigation continues. We do this here |
- // to avoid sending a DidStopLoading message to the browser process. |
- OnStop(); |
- |
- // Replace the page with a blank dummy URL. The unload handler will not be |
- // run a second time, thanks to a check in FrameLoader::stopLoading. |
- // TODO(creis): Need to add a better way to do this that avoids running the |
- // beforeunload handler. For now, we just run it a second time silently. |
- NavigateToSwappedOutURL(webview()->mainFrame()); |
- |
- // Let WebKit know that this view is hidden so it can drop resources and |
- // stop compositing. |
- webview()->setVisibilityState(blink::WebPageVisibilityStateHidden, false); |
- } |
- |
- // It is now safe to show modal dialogs again. |
- suppress_dialogs_until_swap_out_ = false; |
- |
- Send(new ViewHostMsg_SwapOut_ACK(routing_id_)); |
-} |
- |
void RenderViewImpl::NavigateToSwappedOutURL(blink::WebFrame* frame) { |
// We use loadRequest instead of loadHTMLString because the former commits |
// synchronously. Otherwise a new navigation can interrupt the navigation |