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

Side by Side Diff: ios/showcase/content_suggestions/sc_content_suggestions_item.mm

Issue 2769063005: Add CSDataSource in showcase (Closed)
Patch Set: Address comments 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 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 #import "ios/showcase/content_suggestions/sc_content_suggestions_item.h"
6
7 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_cel l.h"
8 #import "ios/chrome/browser/ui/favicon/favicon_view.h"
9
10 #if !defined(__has_feature) || !__has_feature(objc_arc)
11 #error "This file requires ARC support."
12 #endif
13
14 @implementation SCContentSuggestionsItem
15
16 @synthesize delegate;
17 @synthesize attributes;
18 @synthesize suggestionIdentifier;
19 @synthesize image;
20 @synthesize title;
21 @synthesize subtitle;
22 @synthesize hasImage;
23 @synthesize publisher;
24 @synthesize publishDate;
25 @synthesize availableOffline;
26
27 - (instancetype)initWithType:(NSInteger)type {
28 self = [super initWithType:type];
29 if (self) {
30 self.cellClass = [ContentSuggestionsCell class];
31 }
32 return self;
33 }
34
35 - (void)configureCell:(ContentSuggestionsCell*)cell {
36 [super configureCell:cell];
37 [cell.faviconView configureWithAttributes:self.attributes];
38 cell.titleLabel.text = self.title;
39 [cell setSubtitleText:self.subtitle];
40 cell.displayImage = self.hasImage;
41 [cell setContentImage:self.image];
42 [cell setAdditionalInformationWithPublisherName:self.publisher
43 date:self.publishDate
44 offlineAvailability:self.availableOffline];
45 }
46
47 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698