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

Unified Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 256015: Stops the throbber from spinning if the user cancels a beforeunload dialog,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 months 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
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_view_host.cc
===================================================================
--- chrome/browser/renderer_host/render_view_host.cc (revision 27429)
+++ chrome/browser/renderer_host/render_view_host.cc (working copy)
@@ -110,6 +110,7 @@
navigations_suspended_(false),
suspended_nav_message_(NULL),
run_modal_reply_msg_(NULL),
+ is_showing_before_unload_dialog_(false),
is_waiting_for_unload_ack_(false),
unload_ack_is_for_cross_site_transition_(false),
are_javascript_messages_suppressed_(false),
@@ -578,6 +579,13 @@
StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS));
}
+ if (is_showing_before_unload_dialog_ && !success) {
+ // If a beforeunload dialog is canceled, we need to stop the throbber from
+ // spinning, since we forced it to start spinning in Navigate.
+ delegate_->DidStopLoading(this);
+ }
+ is_showing_before_unload_dialog_ = false;
+
ViewHostMsg_RunJavaScriptMessage::WriteReplyParams(reply_msg,
success, prompt);
Send(reply_msg);
@@ -1301,6 +1309,7 @@
// shouldn't process input events.
process()->set_ignore_input_events(true);
StopHangMonitorTimeout();
+ is_showing_before_unload_dialog_ = true;
delegate_->RunBeforeUnloadConfirm(message, reply_msg);
}
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698