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

Unified Diff: chrome/browser/ui/cocoa/new_tab_button.mm

Issue 8566036: Ignore button mouse enter for new tab button (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix another comment to be a sentence Created 9 years, 1 month 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/app/nibs/BrowserWindow.xib ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/new_tab_button.mm
diff --git a/chrome/browser/ui/cocoa/new_tab_button.mm b/chrome/browser/ui/cocoa/new_tab_button.mm
index ad719b803fb763a9211fbd210b79b5f4c8d41238..d6411f8901a0c9f27cb8699b16dfebc09093d49b 100644
--- a/chrome/browser/ui/cocoa/new_tab_button.mm
+++ b/chrome/browser/ui/cocoa/new_tab_button.mm
@@ -5,10 +5,27 @@
#import "chrome/browser/ui/cocoa/new_tab_button.h"
#import "chrome/browser/ui/cocoa/image_button_cell.h"
+// A simple override of the ImageButtonCell to disable handling of
+// -mouseEntered.
+@interface NewTabButtonCell : ImageButtonCell
+
+- (void)mouseEntered:(NSEvent*)theEvent;
+
+@end
+
+@implementation NewTabButtonCell
+
+- (void)mouseEntered:(NSEvent*)theEvent {
+ // Ignore this since the NTB enter is handled by the TabStripController.
+}
+
+@end
+
+
@implementation NewTabButton
+ (Class)cellClass {
- return [ImageButtonCell class];
+ return [NewTabButtonCell class];
}
// Approximate the shape. It doesn't need to be perfect. This will need to be
« no previous file with comments | « chrome/app/nibs/BrowserWindow.xib ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698