diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-15 18:08:49 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-15 18:08:49 +0000 |
commit | c398981aa94189d9173b304e5b1d67f97e79fbc8 (patch) | |
tree | a76be0ddc0038b3e9c2d28736e351fc0117e1320 /chrome/browser/browser.cc | |
parent | 8aa31e5bb274abd6f5eb43e6297e00cf6d365856 (diff) | |
download | chromium_src-c398981aa94189d9173b304e5b1d67f97e79fbc8.zip chromium_src-c398981aa94189d9173b304e5b1d67f97e79fbc8.tar.gz chromium_src-c398981aa94189d9173b304e5b1d67f97e79fbc8.tar.bz2 |
Fix regression I introduced where Stop/Go button would toggle state instantly instead of having protections against accidental user actions while the mouse was hovering the button.
I elected to condense ChangeMode() and ScheduleChangeMode() into one function, which as a result became pretty simple.
BUG=9843
Review URL: http://codereview.chromium.org/67156
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13761 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 9609a0b..e8a3e4f 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -1580,7 +1580,7 @@ void Browser::TabSelectedAt(TabContents* old_contents, UpdateToolbar(true); // Update stop/go state. - UpdateStopGoState(new_contents->is_loading()); + UpdateStopGoState(new_contents->is_loading(), true); // Update commands to reflect current state. UpdateCommandsForTabState(); @@ -1832,7 +1832,7 @@ void Browser::LoadingStateChanged(TabContents* source) { window_->UpdateTitleBar(); if (source == GetSelectedTabContents()) { - UpdateStopGoState(source->is_loading()); + UpdateStopGoState(source->is_loading(), false); if (GetStatusBubble()) GetStatusBubble()->SetStatus(GetSelectedTabContents()->GetStatusText()); } @@ -2245,8 +2245,8 @@ void Browser::UpdateCommandsForFullscreenMode(bool is_fullscreen) { command_updater_.UpdateCommandEnabled(IDC_ABOUT, show_main_ui); } -void Browser::UpdateStopGoState(bool is_loading) { - window_->UpdateStopGoState(is_loading); +void Browser::UpdateStopGoState(bool is_loading, bool force) { + window_->UpdateStopGoState(is_loading, force); command_updater_.UpdateCommandEnabled(IDC_GO, !is_loading); command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading); } |