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