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

Unified Diff: chrome/browser/cocoa/reload_button.mm

Issue 3198005: Disable the stop button when the user is hovering it and the page finishes lo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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/browser_theme_provider.cc ('k') | chrome/browser/cocoa/reload_button_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/reload_button.mm
===================================================================
--- chrome/browser/cocoa/reload_button.mm (revision 56775)
+++ chrome/browser/cocoa/reload_button.mm (working copy)
@@ -58,15 +58,18 @@
// Can always transition to stop mode. Only transition to reload
// mode if forced or if the mouse isn't hovering. Otherwise, note
- // that reload mode is desired and make no change.
+ // that reload mode is desired and disable the button.
if (isLoading) {
[self setImage:nsimage_cache::ImageNamed(kStopImageName)];
[self setTag:IDC_STOP];
+ [self setEnabled:YES];
} else if (force || ![self isMouseInside]) {
[self setImage:nsimage_cache::ImageNamed(kReloadImageName)];
[self setTag:IDC_RELOAD];
+ [self setEnabled:YES];
} else if ([self tag] == IDC_STOP) {
pendingReloadMode_ = YES;
+ [self setEnabled:NO];
}
}
« no previous file with comments | « chrome/browser/browser_theme_provider.cc ('k') | chrome/browser/cocoa/reload_button_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698