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

Side by Side Diff: ios/chrome/browser/ui/stack_view/card_stack_pinch_gesture_recognizer.mm

Issue 2944443003: [ObjC ARC] Converts ios/chrome/browser/ui/stack_view:stack_view to ARC. (Closed)
Patch Set: Add and use explicit disconnect in CardSet. Created 3 years, 6 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
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/stack_view/card_stack_pinch_gesture_recognizer.h" 5 #import "ios/chrome/browser/ui/stack_view/card_stack_pinch_gesture_recognizer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 #if !defined(__has_feature) || !__has_feature(objc_arc)
10 #error "This file requires ARC support."
11 #endif
12
9 @interface CardStackPinchGestureRecognizer () 13 @interface CardStackPinchGestureRecognizer ()
10 14
11 // Returns the number of non-ended, non-cancelled touches in |event|. 15 // Returns the number of non-ended, non-cancelled touches in |event|.
12 - (NSUInteger)numberOfActiveTouchesInEvent:(UIEvent*)event; 16 - (NSUInteger)numberOfActiveTouchesInEvent:(UIEvent*)event;
13 17
14 @end 18 @end
15 19
16 @implementation CardStackPinchGestureRecognizer 20 @implementation CardStackPinchGestureRecognizer
17 21
18 @synthesize numberOfActiveTouches = numberOfActiveTouches_; 22 @synthesize numberOfActiveTouches = numberOfActiveTouches_;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 NSUInteger count = 0; 55 NSUInteger count = 0;
52 for (UITouch* touch in [event touchesForGestureRecognizer:self]) { 56 for (UITouch* touch in [event touchesForGestureRecognizer:self]) {
53 if (touch.phase == UITouchPhaseBegan || touch.phase == UITouchPhaseMoved || 57 if (touch.phase == UITouchPhaseBegan || touch.phase == UITouchPhaseMoved ||
54 touch.phase == UITouchPhaseStationary) 58 touch.phase == UITouchPhaseStationary)
55 count++; 59 count++;
56 } 60 }
57 return count; 61 return count;
58 } 62 }
59 63
60 @end 64 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/stack_view/card_stack_layout_manager.mm ('k') | ios/chrome/browser/ui/stack_view/card_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698