OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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_NTP_MOST_VISITED_CELL_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_NTP_MOST_VISITED_CELL_H_ |
6 #define IOS_CHROME_BROWSER_UI_NTP_MOST_VISITED_CELL_H_ | 6 #define IOS_CHROME_BROWSER_UI_NTP_MOST_VISITED_CELL_H_ |
7 | 7 |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #include "components/ntp_tiles/metrics.h" | 10 #include "components/ntp_tiles/metrics.h" |
11 #include "url/gurl.h" | 11 #include "url/gurl.h" |
12 | 12 |
13 namespace ios { | 13 namespace ios { |
14 class ChromeBrowserState; | 14 class ChromeBrowserState; |
15 } | 15 } |
16 | 16 |
17 // Cell showing each most visited image, favicon and title. | 17 // Cell showing each most visited image, favicon and title. |
18 @interface MostVisitedCell : UICollectionViewCell | 18 @interface MostVisitedCell : UICollectionViewCell |
19 | 19 |
20 // URL of the top site. | 20 // URL of the top site. |
21 @property(nonatomic, assign) GURL URL; | 21 @property(nonatomic, assign) GURL URL; |
22 // Reference to the relevant ChromeBrowserState | 22 // Reference to the relevant ChromeBrowserState |
23 @property(nonatomic, readonly) ios::ChromeBrowserState* browserState; | 23 @property(nonatomic, readonly) ios::ChromeBrowserState* browserState; |
24 // Type of tile (icon, scrabble tile, default) | 24 // Type of tile (icon, scrabble tile, default) |
25 @property(nonatomic, readonly) ntp_tiles::metrics::MostVisitedTileType tileType; | 25 @property(nonatomic, readonly) ntp_tiles::TileVisualType tileType; |
26 | 26 |
27 // Set text of top site. | 27 // Set text of top site. |
28 - (void)setText:(NSString*)text; | 28 - (void)setText:(NSString*)text; |
29 // Show the placeholder image in the cell instead of a most visited site. | 29 // Show the placeholder image in the cell instead of a most visited site. |
30 - (void)showPlaceholder; | 30 - (void)showPlaceholder; |
31 // Removes the placeholder image from the cell. Used to make a cell appear | 31 // Removes the placeholder image from the cell. Used to make a cell appear |
32 // empty/invisible. | 32 // empty/invisible. |
33 - (void)removePlaceholderImage; | 33 - (void)removePlaceholderImage; |
34 // Setup the display state of the cell. | 34 // Setup the display state of the cell. |
35 - (void)setupWithURL:(GURL)URL | 35 - (void)setupWithURL:(GURL)URL |
36 title:(NSString*)title | 36 title:(NSString*)title |
37 browserState:(ios::ChromeBrowserState*)browserState; | 37 browserState:(ios::ChromeBrowserState*)browserState; |
38 | 38 |
39 // Preferred maximum cell size. | 39 // Preferred maximum cell size. |
40 + (CGSize)maximumSize; | 40 + (CGSize)maximumSize; |
41 @end | 41 @end |
42 | 42 |
43 #endif // IOS_CHROME_BROWSER_UI_NTP_MOST_VISITED_CELL_H_ | 43 #endif // IOS_CHROME_BROWSER_UI_NTP_MOST_VISITED_CELL_H_ |
OLD | NEW |