OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import "ios/chrome/browser/ui/side_swipe/side_swipe_util.h" |
| 6 |
| 7 #import <UIKit/UIKit.h> |
| 8 |
| 9 #include "ios/chrome/browser/ui/rtl_geometry.h" |
| 10 |
| 11 BOOL IsSwipingBack(UISwipeGestureRecognizerDirection direction) { |
| 12 if (UseRTLLayout()) |
| 13 return direction == UISwipeGestureRecognizerDirectionLeft; |
| 14 else |
| 15 return direction == UISwipeGestureRecognizerDirectionRight; |
| 16 } |
| 17 |
| 18 BOOL IsSwipingForward(UISwipeGestureRecognizerDirection direction) { |
| 19 if (UseRTLLayout()) |
| 20 return direction == UISwipeGestureRecognizerDirectionRight; |
| 21 else |
| 22 return direction == UISwipeGestureRecognizerDirectionLeft; |
| 23 } |
OLD | NEW |