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

Unified Diff: chrome/browser/ui/browser.cc

Issue 161113002: Fix pushState causing stop/reload button and favicon to flicker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/ui/browser.h ('k') | chrome/browser/ui/browser_tab_strip_model_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 9a802f8f4b8ae223d371f53873675db5756954e8..85824f49bf5159db5bc1dc91c9e26f9cf2571a45 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -914,7 +914,7 @@ void Browser::TabInsertedAt(WebContents* contents,
// Make sure the loading state is updated correctly, otherwise the throbber
// won't start if the page is loading.
- LoadingStateChanged(contents);
+ LoadingStateChanged(contents, true);
interstitial_observers_.push_back(new InterstitialObserver(this, contents));
@@ -1339,13 +1339,14 @@ void Browser::DeactivateContents(WebContents* contents) {
window_->Deactivate();
}
-void Browser::LoadingStateChanged(WebContents* source) {
+void Browser::LoadingStateChanged(WebContents* source,
+ bool to_different_document) {
window_->UpdateLoadingAnimations(tab_strip_model_->TabsAreLoading());
window_->UpdateTitleBar();
WebContents* selected_contents = tab_strip_model_->GetActiveWebContents();
if (source == selected_contents) {
- bool is_loading = source->IsLoading();
+ bool is_loading = source->IsLoading() && to_different_document;
command_controller_->LoadingStateChanged(is_loading, false);
if (GetStatusBubble()) {
GetStatusBubble()->SetStatus(CoreTabHelper::FromWebContents(
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_tab_strip_model_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698