summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/tab_strip_view.mm
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 07:28:17 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 07:28:17 +0000
commit8050f2a8f3d1d98bc80ab4ccd5266c5bc6d0678f (patch)
tree8b3eecb5432b1df8582c7154bd65b6037e542916 /chrome/browser/cocoa/tab_strip_view.mm
parent01dc650e2499dd966e4025a6022cdc6d82087c39 (diff)
downloadchromium_src-8050f2a8f3d1d98bc80ab4ccd5266c5bc6d0678f.zip
chromium_src-8050f2a8f3d1d98bc80ab4ccd5266c5bc6d0678f.tar.gz
chromium_src-8050f2a8f3d1d98bc80ab4ccd5266c5bc6d0678f.tar.bz2
Mac: move should-double-click-to-minimize code into mac_util.
Also make the fullscreen code do the right thing in theory, even though it doesn't work and I'll probably shortly remove it. BUG=none TEST=Double-clicking on the tab strip should or should not minimize the window according to the system prefs setting; click in the area beside the tabs. Review URL: http://codereview.chromium.org/859004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41413 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_strip_view.mm')
-rw-r--r--chrome/browser/cocoa/tab_strip_view.mm14
1 files changed, 2 insertions, 12 deletions
diff --git a/chrome/browser/cocoa/tab_strip_view.mm b/chrome/browser/cocoa/tab_strip_view.mm
index 797bf14..a5d61f6 100644
--- a/chrome/browser/cocoa/tab_strip_view.mm
+++ b/chrome/browser/cocoa/tab_strip_view.mm
@@ -4,6 +4,7 @@
#import "chrome/browser/cocoa/tab_strip_view.h"
+#include "base/mac_util.h"
#import "chrome/browser/cocoa/browser_window_controller.h"
#import "chrome/browser/cocoa/tab_strip_controller.h"
#include "base/logging.h"
@@ -117,18 +118,7 @@
// "short" as 0.8 seconds. (Measuring up-to-up isn't enough to properly
// detect double-clicks, but we're actually using Cocoa for that.)
if (clickCount == 2 && (timestamp - lastMouseUp_) < 0.8) {
- // We use an undocumented method in Cocoa; if it doesn't exist, default to
- // YES. If it ever goes away, we can do (using an undocumented pref. key):
- // NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
- // if (![defaults objectForKey:@"AppleMiniaturizeOnDoubleClick"]
- // || [defaults boolForKey:@"AppleMiniaturizeOnDoubleClick"])
- // [[self window] performMiniaturize:self];
- DCHECK([NSWindow
- respondsToSelector:@selector(_shouldMiniaturizeOnDoubleClick)]);
- if (![NSWindow
- respondsToSelector:@selector(_shouldMiniaturizeOnDoubleClick)]
- || [NSWindow
- performSelector:@selector(_shouldMiniaturizeOnDoubleClick)])
+ if (mac_util::ShouldWindowsMiniaturizeOnDoubleClick())
[[self window] performMiniaturize:self];
} else {
[super mouseUp:event];