diff options
author | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-19 14:58:27 +0000 |
---|---|---|
committer | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-19 14:58:27 +0000 |
commit | 159f77627c71bc666863cde38a358281d8b5fe0d (patch) | |
tree | a0cdf6c888ac38ae77ae74b06afb4216f0a408b9 /chrome | |
parent | dc7e4ec282dbf7a384c9ab47af0935c2b603efce (diff) | |
download | chromium_src-159f77627c71bc666863cde38a358281d8b5fe0d.zip chromium_src-159f77627c71bc666863cde38a358281d8b5fe0d.tar.gz chromium_src-159f77627c71bc666863cde38a358281d8b5fe0d.tar.bz2 |
Fixes bug where we wouldn't necessarily start throbber timer on drop
of a tab if the page was loading. The fix is to call
LoadingStateChanged, which makes sure everything is in sync and the
timer is running (if necessary).
BUG=2524
TEST=Create two windows. In one of the windows load a page that takes
a long time to load. Drag the tab into the first window and make sure
when the tab snaps to the final position the throbber starts
appropriately.
Review URL: http://codereview.chromium.org/15056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7300 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 310103f..9d9d139 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -1236,6 +1236,9 @@ void Browser::CreateNewStripWithContents(TabContents* detached_contents, browser->set_override_maximized(maximize); browser->CreateBrowserWindow(); browser->tabstrip_model()->AppendTabContents(detached_contents, true); + // Make sure the loading state is updated correctly, otherwise the throbber + // won't start if the page is loading. + browser->LoadingStateChanged(detached_contents); browser->window()->Show(); // When we detach a tab we need to make sure any associated Find window moves @@ -1364,6 +1367,10 @@ void Browser::TabInsertedAt(TabContents* contents, if (web_contents) web_contents->view()->ReparentFindWindow(this); + // Make sure the loading state is updated correctly, otherwise the throbber + // won't start if the page is loading. + LoadingStateChanged(contents); + // If the tab crashes in the beforeunload or unload handler, it won't be // able to ack. But we know we can close it. NotificationService::current()-> |