| 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.
|
|
|