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

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

Issue 100033: Synchronously update the loading state when a load starts so that the UI will... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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
Index: chrome/browser/renderer_host/render_view_host.cc
===================================================================
--- chrome/browser/renderer_host/render_view_host.cc (revision 14707)
+++ chrome/browser/renderer_host/render_view_host.cc (working copy)
@@ -226,6 +226,16 @@
suspended_nav_message_.reset(nav_message);
} else {
Send(nav_message);
+
+ // Force the throbber to start. We do this because WebKit's "started
+ // loading" message will be received asynchronously from the UI of the
+ // browser. But we want to keep the throbber in sync with what's happening
+ // in the UI. For example, we want to start throbbing immediately when the
+ // user naivgates even if the renderer is delayed. There is also an issue
+ // with the throbber starting because the DOMUI (which controls whether the
+ // favicon is displayed) happens synchronously. If the start loading
+ // messages was asynchronous, then the default favicon would flash in.
+ delegate_->DidStartLoading(this);
}
}
@@ -947,12 +957,12 @@
delegate_->DidRedirectProvisionalLoad(page_id, source_url, target_url);
}
-void RenderViewHost::OnMsgDidStartLoading(int32 page_id) {
- delegate_->DidStartLoading(this, page_id);
+void RenderViewHost::OnMsgDidStartLoading() {
+ delegate_->DidStartLoading(this);
}
-void RenderViewHost::OnMsgDidStopLoading(int32 page_id) {
- delegate_->DidStopLoading(this, page_id);
+void RenderViewHost::OnMsgDidStopLoading() {
+ delegate_->DidStopLoading(this);
}
void RenderViewHost::OnMsgDidLoadResourceFromMemoryCache(
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/browser/renderer_host/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698