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

Unified Diff: ios/chrome/browser/ui/side_swipe/side_swipe_util.mm

Issue 2587023002: Upstream Chrome on iOS source code [8/11]. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/ui/side_swipe/side_swipe_util.h ('k') | ios/chrome/browser/ui/stack_view/card_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/side_swipe/side_swipe_util.mm
diff --git a/ios/chrome/browser/ui/side_swipe/side_swipe_util.mm b/ios/chrome/browser/ui/side_swipe/side_swipe_util.mm
new file mode 100644
index 0000000000000000000000000000000000000000..f8a2a0dc160b2ff29c7228f61e6ab512e539c5b9
--- /dev/null
+++ b/ios/chrome/browser/ui/side_swipe/side_swipe_util.mm
@@ -0,0 +1,23 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "ios/chrome/browser/ui/side_swipe/side_swipe_util.h"
+
+#import <UIKit/UIKit.h>
+
+#include "ios/chrome/browser/ui/rtl_geometry.h"
+
+BOOL IsSwipingBack(UISwipeGestureRecognizerDirection direction) {
+ if (UseRTLLayout())
+ return direction == UISwipeGestureRecognizerDirectionLeft;
+ else
+ return direction == UISwipeGestureRecognizerDirectionRight;
+}
+
+BOOL IsSwipingForward(UISwipeGestureRecognizerDirection direction) {
+ if (UseRTLLayout())
+ return direction == UISwipeGestureRecognizerDirectionRight;
+ else
+ return direction == UISwipeGestureRecognizerDirectionLeft;
+}
« no previous file with comments | « ios/chrome/browser/ui/side_swipe/side_swipe_util.h ('k') | ios/chrome/browser/ui/stack_view/card_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698