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

Unified Diff: ios/showcase/content_suggestions/sc_content_suggestions_most_visited_item.mm

Issue 2769063005: Add CSDataSource in showcase (Closed)
Patch Set: Address comments Created 3 years, 7 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
« no previous file with comments | « ios/showcase/content_suggestions/sc_content_suggestions_most_visited_item.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/showcase/content_suggestions/sc_content_suggestions_most_visited_item.mm
diff --git a/ios/showcase/content_suggestions/sc_content_suggestions_most_visited_item.mm b/ios/showcase/content_suggestions/sc_content_suggestions_most_visited_item.mm
new file mode 100644
index 0000000000000000000000000000000000000000..0dc3a319d15c0becb3244776e968085edc5c383a
--- /dev/null
+++ b/ios/showcase/content_suggestions/sc_content_suggestions_most_visited_item.mm
@@ -0,0 +1,37 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "ios/showcase/content_suggestions/sc_content_suggestions_most_visited_item.h"
+
+#import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_cell.h"
+#import "ios/chrome/browser/ui/favicon/favicon_view.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+@implementation SCContentSuggestionsMostVisitedItem
+
+@synthesize delegate;
+@synthesize attributes;
+@synthesize image;
+@synthesize suggestionIdentifier;
+@synthesize title;
+
+- (instancetype)initWithType:(NSInteger)type {
+ self = [super initWithType:type];
+ if (self) {
+ self.cellClass = [ContentSuggestionsMostVisitedCell class];
+ }
+ return self;
+}
+
+- (void)configureCell:(ContentSuggestionsMostVisitedCell*)cell {
+ [super configureCell:cell];
+ cell.titleLabel.text = self.title;
+ cell.accessibilityLabel = self.title;
+ [cell.faviconView configureWithAttributes:self.attributes];
+}
+
+@end
« no previous file with comments | « ios/showcase/content_suggestions/sc_content_suggestions_most_visited_item.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698