diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-07 22:20:14 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-07 22:20:14 +0000 |
commit | 35b1eb2a2e8bca7732421539e9094813fc7e77e2 (patch) | |
tree | 7145b80fb0892e45a5eb8737833f63cabad6a0b9 /chrome/browser/cocoa/toolbar_controller.h | |
parent | 9281f8359ca7e19cb067ca9e4995ff158252f44c (diff) | |
download | chromium_src-35b1eb2a2e8bca7732421539e9094813fc7e77e2.zip chromium_src-35b1eb2a2e8bca7732421539e9094813fc7e77e2.tar.gz chromium_src-35b1eb2a2e8bca7732421539e9094813fc7e77e2.tar.bz2 |
[Mac] Don't change state from stop to reload when hovered.
Hold the reload button state change from stop to reload until the
mouse exits. Also short-circuit the stop message when the real state
should be reload. Also prevent multi-clicks from sending multiple
actions.
Toolbar.xib: reload button made kind of ReloadButton.
BUG=47184
TEST=Browse to a slow page, mouse over stop button. Should not go to reload button when throbber (in tab) stops.
TEST=After page loaded, click stop. Should not crash.
TEST=Hover over reload button. Command-r should start a reload and change the button to stop button.
Review URL: http://codereview.chromium.org/2847051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/toolbar_controller.h')
-rw-r--r-- | chrome/browser/cocoa/toolbar_controller.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/browser/cocoa/toolbar_controller.h b/chrome/browser/cocoa/toolbar_controller.h index 313ef4e..be27c42 100644 --- a/chrome/browser/cocoa/toolbar_controller.h +++ b/chrome/browser/cocoa/toolbar_controller.h @@ -32,6 +32,7 @@ class MenuDelegate; class PrefObserverBridge; } class Profile; +@class ReloadButton; class TabContents; class ToolbarModel; class WrenchMenuModel; @@ -49,7 +50,7 @@ class WrenchMenuModel; // corresponding enum in the unit tests. IBOutlet DelayedMenuButton* backButton_; IBOutlet DelayedMenuButton* forwardButton_; - IBOutlet NSButton* reloadButton_; + IBOutlet ReloadButton* reloadButton_; IBOutlet NSButton* homeButton_; IBOutlet MenuButton* wrenchButton_; IBOutlet AutocompleteTextField* locationBar_; @@ -129,9 +130,11 @@ class WrenchMenuModel; // Sets whether or not the current page in the frontmost tab is bookmarked. - (void)setStarredState:(BOOL)isStarred; -// Called to update the loading state. Handles updating the go/stop button -// state. -- (void)setIsLoading:(BOOL)isLoading; +// Called to update the loading state. Handles updating the go/stop +// button state. |force| is set if the update is due to changing +// tabs, as opposed to the page-load finishing. See comment in +// reload_button.h. +- (void)setIsLoading:(BOOL)isLoading force:(BOOL)force; // Allow turning off the toolbar (but we may keep the location bar without a // surrounding toolbar). If |toolbar| is YES, the value of |hasLocationBar| is |