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

Unified Diff: ios/chrome/browser/ui/side_swipe_gesture_recognizer.h

Issue 1058933002: [iOS] Upstream //ios/chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@upstreamMemory
Patch Set: Review comments Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/side_swipe_gesture_recognizer.h
diff --git a/ios/chrome/browser/ui/side_swipe_gesture_recognizer.h b/ios/chrome/browser/ui/side_swipe_gesture_recognizer.h
new file mode 100644
index 0000000000000000000000000000000000000000..3e97dda687f575675b7a4c52e02a32517e0e7553
--- /dev/null
+++ b/ios/chrome/browser/ui/side_swipe_gesture_recognizer.h
@@ -0,0 +1,26 @@
+// Copyright 2012 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.
+
+#ifndef IOS_CHROME_BROWSER_UI_SIDE_SWIPE_GESTURE_RECOGNIZER_H_
+#define IOS_CHROME_BROWSER_UI_SIDE_SWIPE_GESTURE_RECOGNIZER_H_
+
+#import <UIKit/UIGestureRecognizerSubclass.h>
+#import <UIKit/UIKit.h>
+
+// This gesture recognizer is used because the default swipe gesture recognizer
+// is too restrictive. The default swipe requires a particular velocity and
+// distance that Chrome does not require.
+// Another benefit of using a custom gesture recognizer is it can fail faster,
+// so recognizers that depend on this recognizer can begin faster.
+@interface SideSwipeGestureRecognizer : UIPanGestureRecognizer
+
+// The distance from the edge of the screen in which a side swipe can start.
+@property(nonatomic, assign) CGFloat swipeEdge;
+// The distance from the edge of the screen from which a gesture starts.
+@property(readonly, nonatomic) CGFloat swipeOffset;
+@property(nonatomic, assign) UISwipeGestureRecognizerDirection direction;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_SIDE_SWIPE_GESTURE_RECOGNIZER_H_
« no previous file with comments | « ios/chrome/browser/ui/show_privacy_settings_util.mm ('k') | ios/chrome/browser/ui/side_swipe_gesture_recognizer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698