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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #import "base/memory/scoped_nsobject.h" 9 #import "base/memory/scoped_nsobject.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 // The three-finger gesture is controlled by the integer preference 561 // The three-finger gesture is controlled by the integer preference
562 // |com.apple.trackpad.threeFingerHorizSwipeGesture|. Its value is 0 for (A) 562 // |com.apple.trackpad.threeFingerHorizSwipeGesture|. Its value is 0 for (A)
563 // and 1 for (B, C). 563 // and 1 for (B, C).
564 // 564 //
565 // The two-finger gesture is controlled by the preference below and is boolean 565 // The two-finger gesture is controlled by the preference below and is boolean
566 // YES for (A, C) and NO for (B). 566 // YES for (A, C) and NO for (B).
567 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; 567 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
568 return [defaults boolForKey:@"AppleEnableSwipeNavigateWithScrolls"]; 568 return [defaults boolForKey:@"AppleEnableSwipeNavigateWithScrolls"];
569 } 569 }
570 570
571 - (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.
572 if (!base::mac::IsOSLionOrLater())
573 return NO;
574
575 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
576 // The defaults must be synchronized here otherwise a stale value will be
577 // returned for an indeterminante amount of time. For some reason, this is
578 // not necessary in |-recognizeTwoFingerGestures|.
579 [defaults synchronize];
580 return [defaults boolForKey:@"com.apple.swipescrolldirection"];
581 }
582
571 @end // @implementation BrowserWindowController(Private) 583 @end // @implementation BrowserWindowController(Private)
OLDNEW
« 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