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

Side by Side Diff: ios/chrome/browser/ui/side_swipe/side_swipe_util.mm

Issue 2827643002: [ObjC ARC] Converts ios/chrome/browser/ui/side_swipe:side_swipe to ARC. (Closed)
Patch Set: weak Created 3 years, 8 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
« no previous file with comments | « ios/chrome/browser/ui/side_swipe/side_swipe_navigation_view.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 "ios/chrome/browser/ui/side_swipe/side_swipe_util.h" 5 #import "ios/chrome/browser/ui/side_swipe/side_swipe_util.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include "ios/chrome/browser/ui/rtl_geometry.h" 9 #include "ios/chrome/browser/ui/rtl_geometry.h"
10 10
11 #if !defined(__has_feature) || !__has_feature(objc_arc)
12 #error "This file requires ARC support."
13 #endif
14
11 BOOL IsSwipingBack(UISwipeGestureRecognizerDirection direction) { 15 BOOL IsSwipingBack(UISwipeGestureRecognizerDirection direction) {
12 if (UseRTLLayout()) 16 if (UseRTLLayout())
13 return direction == UISwipeGestureRecognizerDirectionLeft; 17 return direction == UISwipeGestureRecognizerDirectionLeft;
14 else 18 else
15 return direction == UISwipeGestureRecognizerDirectionRight; 19 return direction == UISwipeGestureRecognizerDirectionRight;
16 } 20 }
17 21
18 BOOL IsSwipingForward(UISwipeGestureRecognizerDirection direction) { 22 BOOL IsSwipingForward(UISwipeGestureRecognizerDirection direction) {
19 if (UseRTLLayout()) 23 if (UseRTLLayout())
20 return direction == UISwipeGestureRecognizerDirectionRight; 24 return direction == UISwipeGestureRecognizerDirectionRight;
21 else 25 else
22 return direction == UISwipeGestureRecognizerDirectionLeft; 26 return direction == UISwipeGestureRecognizerDirectionLeft;
23 } 27 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/side_swipe/side_swipe_navigation_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698