OLD | NEW |
---|---|
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 Loading... | |
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) |
OLD | NEW |