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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 7461080: [Mac] Respect natural/inverted scroll direction on Lion when gesturing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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/ui/cocoa/browser_window_controller_private.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_controller_private.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index 577decf195e9043c96a7e83b2a9b81c09a2f3bb6..92999ba57a9642dbb6af802886cbaff39fc1ea5f 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -568,4 +568,16 @@ willPositionSheet:(NSWindow*)sheet
return [defaults boolForKey:@"AppleEnableSwipeNavigateWithScrolls"];
}
+- (BOOL)isScrollDirectionInverted {
Nico 2011/07/26 15:00:18 Can you move this and the previous function to som
Robert Sesek 2011/07/26 15:56:05 Done.
+ if (!base::mac::IsOSLionOrLater())
+ return NO;
+
+ NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
+ // The defaults must be synchronized here otherwise a stale value will be
+ // returned for an indeterminante amount of time. For some reason, this is
+ // not necessary in |-recognizeTwoFingerGestures|.
+ [defaults synchronize];
+ return [defaults boolForKey:@"com.apple.swipescrolldirection"];
+}
+
@end // @implementation BrowserWindowController(Private)
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698