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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 7465072: Merge 94122 - [Mac] Respect natural/inverted scroll direction on Lion when gesturing. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/835/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
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"
9 #import "base/memory/scoped_nsobject.h" 8 #import "base/memory/scoped_nsobject.h"
10 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
12 #include "chrome/browser/prefs/scoped_user_pref_update.h" 11 #include "chrome/browser/prefs/scoped_user_pref_update.h"
13 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" 13 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
15 #include "chrome/browser/ui/browser_list.h" 14 #include "chrome/browser/ui/browser_list.h"
16 #import "chrome/browser/ui/cocoa/fast_resize_view.h" 15 #import "chrome/browser/ui/cocoa/fast_resize_view.h"
17 #import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h" 16 #import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h"
18 #import "chrome/browser/ui/cocoa/floating_bar_backing_view.h" 17 #import "chrome/browser/ui/cocoa/floating_bar_backing_view.h"
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 return; 536 return;
538 537
539 barVisibilityUpdatesEnabled_ = NO; 538 barVisibilityUpdatesEnabled_ = NO;
540 [fullscreenController_ cancelAnimationAndTimers]; 539 [fullscreenController_ cancelAnimationAndTimers];
541 } 540 }
542 541
543 - (void)setUpOSFullScreenButton { 542 - (void)setUpOSFullScreenButton {
544 // TOOD(rsesek): Properly implement Lion fullscreen <http://crbug.com/74065>. 543 // TOOD(rsesek): Properly implement Lion fullscreen <http://crbug.com/74065>.
545 } 544 }
546 545
547 - (BOOL)recognizeTwoFingerGestures {
548 // Lion or higher will have support for two-finger swipe gestures.
549 if (!base::mac::IsOSLionOrLater())
550 return NO;
551
552 // A note about preferences:
553 // On Lion System Preferences, the swipe gesture behavior is controlled by the
554 // setting in Trackpad --> More Gestures --> Swipe between pages. This setting
555 // has three values:
556 // A) Scroll left or right with two fingers. This should perform a cool
557 // scrolling animation, but doesn't yet <http://crbug.com/90228>.
558 // B) Swipe left or right with three fingers.
559 // C) Swipe with two or three fingers.
560 //
561 // The three-finger gesture is controlled by the integer preference
562 // |com.apple.trackpad.threeFingerHorizSwipeGesture|. Its value is 0 for (A)
563 // and 1 for (B, C).
564 //
565 // The two-finger gesture is controlled by the preference below and is boolean
566 // YES for (A, C) and NO for (B).
567 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
568 return [defaults boolForKey:@"AppleEnableSwipeNavigateWithScrolls"];
569 }
570
571 @end // @implementation BrowserWindowController(Private) 546 @end // @implementation BrowserWindowController(Private)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.h ('k') | chrome/browser/ui/cocoa/gesture_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698