diff options
Diffstat (limited to 'chrome/browser/cocoa/notifications/balloon_view.mm')
| -rw-r--r-- | chrome/browser/cocoa/notifications/balloon_view.mm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/notifications/balloon_view.mm b/chrome/browser/cocoa/notifications/balloon_view.mm index 3a5d13e..0c2e83e 100644 --- a/chrome/browser/cocoa/notifications/balloon_view.mm +++ b/chrome/browser/cocoa/notifications/balloon_view.mm @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/scoped_nsobject.h" +#import "chrome/browser/cocoa/notifications/balloon_controller.h" #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h" namespace { @@ -36,6 +37,16 @@ const int kRoundedCornerSize = 6; - (BOOL)canBecomeMainWindow { return NO; } + +- (void)sendEvent:(NSEvent*)event { + // We do not want to bring chrome window to foreground when we click on close + // or option button. To do this, we have to intercept the event. + BalloonController* delegate = + static_cast<BalloonController*>([self delegate]); + if (![delegate handleEvent:event]) { + [super sendEvent:event]; + } +} @end @implementation BalloonShelfViewCocoa |
