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

Side by Side Diff: ios/chrome/browser/ui/side_swipe_gesture_recognizer.mm

Issue 2569213002: [ObjC ARC] Reland of Converts ios/chrome/browser/ui:ui to ARC. (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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/ui/show_privacy_settings_util.mm ('k') | ios/chrome/browser/ui/ui_util.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_gesture_recognizer.h" 5 #import "ios/chrome/browser/ui/side_swipe_gesture_recognizer.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 #if !defined(__has_feature) || !__has_feature(objc_arc)
12 #error "This file requires ARC support."
13 #endif
14
11 namespace { 15 namespace {
12 16
13 // The absolute maximum swipe angle from |x = y| for a swipe to begin. 17 // The absolute maximum swipe angle from |x = y| for a swipe to begin.
14 const CGFloat kMaxSwipeYAngle = 65; 18 const CGFloat kMaxSwipeYAngle = 65;
15 // The minimum distance between touches for a swipe to begin. 19 // The minimum distance between touches for a swipe to begin.
16 const CGFloat kDefaultMinSwipeXThreshold = 4; 20 const CGFloat kDefaultMinSwipeXThreshold = 4;
17 21
18 } // namespace 22 } // namespace
19 23
20 @implementation SideSwipeGestureRecognizer { 24 @implementation SideSwipeGestureRecognizer {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 _startPoint = CGPointZero; 145 _startPoint = CGPointZero;
142 [super touchesEnded:touches withEvent:event]; 146 [super touchesEnded:touches withEvent:event];
143 } 147 }
144 148
145 - (void)touchesCancelled:(NSSet*)touches withEvent:(UIEvent*)event { 149 - (void)touchesCancelled:(NSSet*)touches withEvent:(UIEvent*)event {
146 _startPoint = CGPointZero; 150 _startPoint = CGPointZero;
147 [super touchesCancelled:touches withEvent:event]; 151 [super touchesCancelled:touches withEvent:event];
148 } 152 }
149 153
150 @end 154 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/show_privacy_settings_util.mm ('k') | ios/chrome/browser/ui/ui_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698