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

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

Issue 661265: P2.1a.
Patch Set: '' Created 10 years, 10 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/cocoa/hover_close_button.h ('k') | chrome/browser/cocoa/tab_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/hover_close_button.mm
diff --git a/chrome/browser/cocoa/hover_close_button.mm b/chrome/browser/cocoa/hover_close_button.mm
index 10c6e46416b55780273d2f7506e8d2b06be86faf..dd3ec510d41c35cc3986e496d0baf286d466e4e8 100644
--- a/chrome/browser/cocoa/hover_close_button.mm
+++ b/chrome/browser/cocoa/hover_close_button.mm
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "base/nsimage_cache_mac.h"
+#import "chrome/browser/cocoa/tab_controller.h"
#include "grit/generated_resources.h"
namespace {
@@ -56,6 +57,12 @@ const NSString* kPressedImageString = @"close_bar_p.pdf";
}
- (void)mouseDown:(NSEvent*)theEvent {
+ // controller_ is only set for close buttons in the tab strip.
+ if (controller_ && ![controller_ closeButtonActive]) {
+ [[controller_ view] mouseDown:theEvent];
+ return;
+ }
+
// The hover button needs to hold onto itself here for a bit. Otherwise,
// it can be freed while |super mouseDown:| is in it's loop, and the
// |checkImageState| call will crash.
« no previous file with comments | « chrome/browser/cocoa/hover_close_button.h ('k') | chrome/browser/cocoa/tab_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698