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

Side by Side Diff: ios/chrome/browser/ui/side_swipe/card_side_swipe_view.h

Issue 2587023002: Upstream Chrome on iOS source code [8/11]. (Closed)
Patch Set: Created 4 years 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
(Empty)
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 #include "base/mac/scoped_nsobject.h"
11 #import "ios/chrome/browser/ui/side_swipe/side_swipe_controller.h"
12
13 @class SideSwipeGestureRecognizer;
14 @class TabModel;
15 @class WebToolbarController;
16
17 @interface SwipeView : UIView {
18 base::scoped_nsobject<UIImageView> image_;
19 base::scoped_nsobject<UIImageView> shadowView_;
20 base::scoped_nsobject<UIImageView> toolbarHolder_;
21 }
22 @end
23
24 @interface CardSideSwipeView : UIView {
25 // The direction of the swipe that initiated this horizontal view.
26 UISwipeGestureRecognizerDirection direction_;
27
28 // Card views currently displayed.
29 base::scoped_nsobject<SwipeView> leftCard_;
30 base::scoped_nsobject<SwipeView> rightCard_;
31
32 // Most recent touch location.
33 CGPoint currentPoint_;
34
35 // Space reserved at the top for the toolbar.
36 CGFloat topMargin_;
37
38 // Tab model.
39 TabModel* model_; // weak
40
41 // The image view containing the background image.
42 base::scoped_nsobject<UIImageView> backgroundView_;
43 }
44
45 @property(nonatomic, assign) id<SideSwipeControllerDelegate> delegate;
46 @property(nonatomic, assign) CGFloat topMargin;
47
48 - (id)initWithFrame:(CGRect)frame
49 topMargin:(CGFloat)margin
50 model:(TabModel*)model;
51 - (void)updateViewsForDirection:(UISwipeGestureRecognizerDirection)direction
52 withToolbar:(WebToolbarController*)toolbarController;
53 - (void)handleHorizontalPan:(SideSwipeGestureRecognizer*)gesture;
54
55 @end
56
57 #endif // IOS_CHROME_BROWSER_UI_SIDE_SWIPE_CARD_SIDE_SWIPE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698