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

Unified Diff: ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_item.mm

Issue 2890193003: Open Most Visited items (Closed)
Patch Set: Fix showcase Created 3 years, 6 months 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_item.mm
diff --git a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_item.mm b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_item.mm
index 59b694390065a8b77aea1973ca87dbfb53680f04..c1006c6c03ca56ff17a71745bde9e6e806bcc6b2 100644
--- a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_item.mm
+++ b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_item.mm
@@ -22,6 +22,7 @@
@synthesize URL = _URL;
@synthesize delegate = _delegate;
@synthesize image = _image;
+@synthesize source = _source;
- (instancetype)initWithType:(NSInteger)type {
self = [super initWithType:type];
@@ -38,4 +39,15 @@
[cell.faviconView configureWithAttributes:self.attributes];
}
+- (ntp_tiles::TileVisualType)tileType {
+ if (!self.attributes) {
+ return ntp_tiles::TileVisualType::NONE;
+ } else if (self.attributes.faviconImage) {
+ return ntp_tiles::TileVisualType::ICON_REAL;
+ }
+ return self.attributes.defaultBackgroundColor
+ ? ntp_tiles::TileVisualType::ICON_DEFAULT
+ : ntp_tiles::TileVisualType::ICON_COLOR;
+}
+
@end

Powered by Google App Engine
This is Rietveld 408576698