summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/cocoa/tab_view.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/tab_view.mm b/chrome/browser/cocoa/tab_view.mm
index 8566eac..1033546 100644
--- a/chrome/browser/cocoa/tab_view.mm
+++ b/chrome/browser/cocoa/tab_view.mm
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chrome/browser/cocoa/tab_controller.h"
#include "chrome/browser/cocoa/tab_view.h"
#include "chrome/browser/cocoa/tab_window_controller.h"
@@ -304,4 +305,11 @@
[sourceController removePlaceholder];
}
+- (void)otherMouseUp:(NSEvent*) theEvent {
+ // Support middle-click-to-close.
+ if ([theEvent buttonNumber] == 2) {
+ [controller_ closeTab:self];
+ }
+}
+
@end