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