Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(959)

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 790843002: If the renderer drops a navigation, make sure the spinner doesn't spin endlessly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 72d53245905548c7587908e18958539a1e3f6875..13bb3160d551efa1c33bffcfa522c75108cc4ada 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -303,6 +303,7 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
OnDidFailLoadWithError)
IPC_MESSAGE_HANDLER_GENERIC(FrameHostMsg_DidCommitProvisionalLoad,
OnDidCommitProvisionalLoad(msg))
+ IPC_MESSAGE_HANDLER(FrameHostMsg_DidDropNavigation, OnDidDropNavigation)
IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL)
IPC_MESSAGE_HANDLER(FrameHostMsg_DocumentOnLoadCompleted,
OnDocumentOnLoadCompleted)
@@ -703,6 +704,14 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
frame_tree_node()->navigator()->DidNavigate(this, validated_params);
}
+void RenderFrameHostImpl::OnDidDropNavigation() {
+ // At the end of Navigate(), the delegate's DidStartLoading is called to force
+ // the spinner to start, even if the renderer didn't yet begin the load. If it
+ // turns out that the renderer dropped the navigation, we need to turn off the
+ // spinner.
+ delegate_->DidStopLoading(this);
+}
+
RenderWidgetHostImpl* RenderFrameHostImpl::GetRenderWidgetHost() {
return static_cast<RenderWidgetHostImpl*>(render_view_host_);
}
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698