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

Side by Side Diff: ios/chrome/browser/ui/collection_view/cells/collection_view_footer_item.h

Issue 2588713002: Upstream Chrome on iOS source code [4/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 2016 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_COLLECTION_VIEW_CELLS_COLLECTION_VIEW_FOOTER_ITEM_ H_
6 #define IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_CELLS_COLLECTION_VIEW_FOOTER_ITEM_ H_
7
8 #import <UIKit/UIKit.h>
9
10 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
11 #import "ios/third_party/material_components_ios/src/components/CollectionCells/ src/MaterialCollectionCells.h"
12 #include "url/gurl.h"
13
14 @class CollectionViewFooterCell;
15
16 @protocol CollectionViewFooterLinkDelegate<NSObject>
17
18 // Notifies the delegate that the link corresponding to |URL| was tapped in
19 // |cell|.
20 - (void)cell:(CollectionViewFooterCell*)cell didTapLinkURL:(GURL)URL;
21
22 @end
23
24 // CollectionViewFooterItem is the model class corresponding to
25 // CollectionViewFooterCell.
26 @interface CollectionViewFooterItem : CollectionViewItem
27
28 // The main text string.
29 @property(nonatomic, copy) NSString* text;
30
31 // The URL to open when the link in |text| is tapped.
32 @property(nonatomic, assign) GURL linkURL;
33
34 // The delegate to notify when the link in |text| is tapped.
35 @property(nonatomic, weak) id<CollectionViewFooterLinkDelegate> linkDelegate;
36
37 // The image to show.
38 @property(nonatomic, strong) UIImage* image;
39
40 @end
41
42 // CollectionViewFooterCell implements a UICollectionViewCell subclass
43 // containing a single text label. The label is laid to fill the full width of
44 // the cell and is wrapped as needed to fit in the cell.
45 @interface CollectionViewFooterCell : MDCCollectionViewCell
46
47 // UILabels corresponding to |text| from the item.
48 @property(nonatomic, readonly, strong) UILabel* textLabel;
49
50 // UIImageView corresponding to |image| from the item.
51 @property(nonatomic, readonly, strong) UIImageView* imageView;
52
53 // Padding on leading and trailing edges of cell.
54 @property(nonatomic, assign) CGFloat horizontalPadding;
55
56 @end
57
58 #endif // IOS_CHROME_BROWSER_UI_COLLECTION_VIEW_CELLS_COLLECTION_VIEW_FOOTER_IT EM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698