OLD | NEW |
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 #ifndef IOS_CHROME_BROWSER_UI_SIDE_SWIPE_SIDE_SWIPE_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_SIDE_SWIPE_SIDE_SWIPE_CONTROLLER_H_ |
6 #define IOS_CHROME_BROWSER_UI_SIDE_SWIPE_SIDE_SWIPE_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_SIDE_SWIPE_SIDE_SWIPE_CONTROLLER_H_ |
7 | 7 |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #include "ios/chrome/browser/infobars/infobar_container_ios.h" | 10 #include "ios/chrome/browser/infobars/infobar_container_ios.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 // Controls how an edge gesture is processed, either as tab change or a page | 72 // Controls how an edge gesture is processed, either as tab change or a page |
73 // change. For tab changes two full screen CardSideSwipeView views are dragged | 73 // change. For tab changes two full screen CardSideSwipeView views are dragged |
74 // across the screen. For page changes the SideSwipeControllerDelegate | 74 // across the screen. For page changes the SideSwipeControllerDelegate |
75 // |contentView| is moved across the screen and a SideSwipeNavigationView is | 75 // |contentView| is moved across the screen and a SideSwipeNavigationView is |
76 // shown in the remaining space. | 76 // shown in the remaining space. |
77 @interface SideSwipeController | 77 @interface SideSwipeController |
78 : NSObject<CRWSwipeRecognizerProvider, UIGestureRecognizerDelegate> | 78 : NSObject<CRWSwipeRecognizerProvider, UIGestureRecognizerDelegate> |
79 | 79 |
80 @property(nonatomic, assign) BOOL inSwipe; | 80 @property(nonatomic, assign) BOOL inSwipe; |
81 @property(nonatomic, assign) id<SideSwipeControllerDelegate> swipeDelegate; | 81 @property(nonatomic, weak) id<SideSwipeControllerDelegate> swipeDelegate; |
82 @property(nonatomic, assign) id<TabSnapshottingDelegate> snapshotDelegate; | 82 @property(nonatomic, weak) id<TabSnapshottingDelegate> snapshotDelegate; |
83 | 83 |
84 // Initializer. | 84 // Initializer. |
85 - (id)initWithTabModel:(TabModel*)model | 85 - (id)initWithTabModel:(TabModel*)model |
86 browserState:(ios::ChromeBrowserState*)browserState; | 86 browserState:(ios::ChromeBrowserState*)browserState; |
87 | 87 |
88 // Set up swipe gesture recognizers. | 88 // Set up swipe gesture recognizers. |
89 - (void)addHorizontalGesturesToView:(UIView*)view; | 89 - (void)addHorizontalGesturesToView:(UIView*)view; |
90 | 90 |
91 // Returns set of UIGestureRecognizer objects. | 91 // Returns set of UIGestureRecognizer objects. |
92 - (NSSet*)swipeRecognizers; | 92 - (NSSet*)swipeRecognizers; |
93 | 93 |
94 // Enable or disable the side swipe gesture recognizer. | 94 // Enable or disable the side swipe gesture recognizer. |
95 - (void)setEnabled:(BOOL)enabled; | 95 - (void)setEnabled:(BOOL)enabled; |
96 | 96 |
97 // Returns |NO| if the device should not rotate. | 97 // Returns |NO| if the device should not rotate. |
98 - (BOOL)shouldAutorotate; | 98 - (BOOL)shouldAutorotate; |
99 | 99 |
100 // Resets the swipeDelegate's contentView frame origin x position to zero. | 100 // Resets the swipeDelegate's contentView frame origin x position to zero. |
101 - (void)resetContentView; | 101 - (void)resetContentView; |
102 | 102 |
103 @end | 103 @end |
104 | 104 |
105 #endif // IOS_CHROME_BROWSER_UI_SIDE_SWIPE_SIDE_SWIPE_CONTROLLER_H_ | 105 #endif // IOS_CHROME_BROWSER_UI_SIDE_SWIPE_SIDE_SWIPE_CONTROLLER_H_ |
OLD | NEW |