diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-04 17:55:46 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-04 17:55:46 +0000 |
commit | 2b4355c4590724ae676f0ec5a8230e5c8c4cddf9 (patch) | |
tree | a087c519b35898d4f8e097f223f7658fd9315638 /chrome/browser/tab_contents/web_contents.cc | |
parent | 1d5222071e5876b345e84d475573ef5db14ba1b4 (diff) | |
download | chromium_src-2b4355c4590724ae676f0ec5a8230e5c8c4cddf9.zip chromium_src-2b4355c4590724ae676f0ec5a8230e5c8c4cddf9.tar.gz chromium_src-2b4355c4590724ae676f0ec5a8230e5c8c4cddf9.tar.bz2 |
Make the throbber throb sooner after you navigate. This fixes the new tab page,
which would not start throbbing until the load committed. I think this was always
broken, but switching the tab contents types covered it up.
Now I have a flag that goes along with the tab updating that indicates if it's
a load update or a full update. This is necessary to avoid updating the title
to the page's URL until it does actually commit.
BUG=9310
Review URL: http://codereview.chromium.org/60066
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13131 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/web_contents.cc')
-rw-r--r-- | chrome/browser/tab_contents/web_contents.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/web_contents.cc b/chrome/browser/tab_contents/web_contents.cc index c4746a1..3ac939a 100644 --- a/chrome/browser/tab_contents/web_contents.cc +++ b/chrome/browser/tab_contents/web_contents.cc @@ -372,6 +372,10 @@ bool WebContents::ShouldDisplayURL() { } bool WebContents::ShouldDisplayFavIcon() { + // Always display a throbber during pending loads. + if (controller()->GetLastCommittedEntry() && controller()->GetPendingEntry()) + return true; + DOMUI* dom_ui = GetDOMUIForCurrentState(); if (dom_ui) return !dom_ui->hide_favicon(); @@ -1501,7 +1505,7 @@ void WebContents::LoadStateChanged(const GURL& url, if (load_state_ == net::LOAD_STATE_READING_RESPONSE) SetNotWaitingForResponse(); if (is_loading()) - NotifyNavigationStateChanged(INVALIDATE_LOAD); + NotifyNavigationStateChanged(INVALIDATE_LOAD | INVALIDATE_FAVICON); } void WebContents::OnDidGetApplicationInfo( |