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
3 // found in the LICENSE file.
4 
5 #ifndef IOS_CHROME_BROWSER_UI_SIDE_SWIPE_CARD_SIDE_SWIPE_VIEW_H_
6 #define IOS_CHROME_BROWSER_UI_SIDE_SWIPE_CARD_SIDE_SWIPE_VIEW_H_
7 
8 #import <UIKit/UIKit.h>
9 
10 #import "ios/chrome/browser/ui/side_swipe/side_swipe_controller.h"
11 
12 @class SideSwipeGestureRecognizer;
13 @protocol SideSwipeToolbarSnapshotProviding;
14 class WebStateList;
15 
16 @interface CardSideSwipeView : UIView
17 
18 @property(nonatomic, weak) id<SideSwipeControllerDelegate> delegate;
19 // Snapshot provider for the top toolbar.
20 @property(nonatomic, weak) id<SideSwipeToolbarSnapshotProviding>
21     topToolbarSnapshotProvider;
22 // Snapshot provider for the bottom toolbar.
23 @property(nonatomic, weak) id<SideSwipeToolbarSnapshotProviding>
24     bottomToolbarSnapshotProvider;
25 // Space reserved at the top for the toolbar.
26 @property(nonatomic, assign) CGFloat topMargin;
27 
28 - (instancetype)initWithFrame:(CGRect)frame
29                     topMargin:(CGFloat)margin
30                  webStateList:(WebStateList*)webStateList;
31 - (void)updateViewsForDirection:(UISwipeGestureRecognizerDirection)direction;
32 - (void)handleHorizontalPan:(SideSwipeGestureRecognizer*)gesture;
33 
34 @end
35 
36 #endif  // IOS_CHROME_BROWSER_UI_SIDE_SWIPE_CARD_SIDE_SWIPE_VIEW_H_
37