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

Side by Side Diff: ios/chrome/browser/ui/overscroll_actions/overscroll_actions_gesture_recognizer.mm

Issue 2817483002: [Workaround] Notify Overscroll Actions that a gesture ended. (Closed)
Patch Set: 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/overscroll_actions/overscroll_actions_gesture_recognizer.h ('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
(Empty)
1 // Copyright 2017 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/overscroll_actions/overscroll_actions_gesture_rec ognizer.h"
6
7 #import <UIKit/UIGestureRecognizerSubclass.h>
8
9 #include "base/mac/scoped_nsobject.h"
10
11 @interface OverscrollActionsGestureRecognizer () {
12 base::scoped_nsprotocol<id> target_;
rohitrao (ping after 24h) 2017/04/12 12:25:57 This might be better as a weak pointer.
justincohen 2017/04/12 16:05:33 Done.
13 SEL action_;
14 }
15 @end
16
17 @implementation OverscrollActionsGestureRecognizer
18
19 - (instancetype)initWithTarget:(id)target action:(SEL)action {
20 self = [super initWithTarget:target action:action];
21 if (self) {
22 target_.reset([target retain]);
23 action_ = action;
24 }
25 return self;
26 }
27
28 - (void)reset {
29 [super reset];
30 [target_ performSelector:action_ withObject:self];
rohitrao (ping after 24h) 2017/04/12 12:25:57 Does the order of these calls matter? Is it ok to
justincohen 2017/04/12 16:05:33 It shouldn't matter, as long as the panGesture: ca
31 }
32
33 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/overscroll_actions/overscroll_actions_gesture_recognizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698