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

Unified Diff: chrome/browser/ui/cocoa/toolbar/reload_button.h

Issue 7466016: Fix up reload button to not flicker, and simplify implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary header Created 9 years, 5 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
Index: chrome/browser/ui/cocoa/toolbar/reload_button.h
diff --git a/chrome/browser/ui/cocoa/toolbar/reload_button.h b/chrome/browser/ui/cocoa/toolbar/reload_button.h
index 6bcebcdeacca39c75337e99dd9e2aa05cb786d32..e0465983f2be5284460e281125f7c86c9c2ef6d2 100644
--- a/chrome/browser/ui/cocoa/toolbar/reload_button.h
+++ b/chrome/browser/ui/cocoa/toolbar/reload_button.h
@@ -8,26 +8,18 @@
#import <Cocoa/Cocoa.h>
-#import "base/memory/scoped_nsobject.h"
+#import "chrome/browser/ui/cocoa/image_button_cell.h"
#import "chrome/browser/ui/cocoa/toolbar/toolbar_button.h"
// ToolbarButton subclass which defers certain state changes when the mouse
// is hovering over it.
-@interface ReloadButton : ToolbarButton {
+@interface ReloadButton : ToolbarButton<ImageButton> {
@private
- // Tracks whether the mouse is hovering for purposes of not making
- // unexpected state changes.
- BOOL isMouseInside_;
- scoped_nsobject<NSTrackingArea> trackingArea_;
-
// Timer used when setting reload mode while the mouse is hovered.
- scoped_nsobject<NSTimer> pendingReloadTimer_;
+ NSTimer* pendingReloadTimer_;
}
-// Returns YES if the mouse is currently inside the bounds.
-- (BOOL)isMouseInside;
-
// Update the tag, and the image and tooltip to match. If |anInt|
// matches the current tag, no action is taken. |anInt| must be
// either |IDC_STOP| or |IDC_RELOAD|.
@@ -43,9 +35,4 @@
@end
-@interface ReloadButton (PrivateTestingMethods)
-+ (void)setPendingReloadTimeout:(NSTimeInterval)seconds;
-- (NSTrackingArea*)trackingArea;
-@end
-
#endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_RELOAD_BUTTON_H_

Powered by Google App Engine
This is Rietveld 408576698