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

Unified Diff: ios/chrome/browser/ui/content_suggestions/content_suggestions_text_item.mm

Issue 2699393003: Cleanup ContentSuggestions, removing unused functions (Closed)
Patch Set: Rebase Created 3 years, 10 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/content_suggestions_text_item.mm
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_item.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_text_item.mm
similarity index 88%
rename from ios/chrome/browser/ui/content_suggestions/content_suggestions_item.mm
rename to ios/chrome/browser/ui/content_suggestions/content_suggestions_text_item.mm
index abc842573468ac1667816b471f1f06a715456437..96f6e67861543bac681a12ed5e0b168195617c2a 100644
--- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_item.mm
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_text_item.mm
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_item.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_text_item.h"
-#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_item_actions.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_text_item_actions.h"
#import "ios/third_party/material_components_ios/src/components/Palettes/src/MaterialPalettes.h"
#import "ios/third_party/material_components_ios/src/components/Typography/src/MaterialTypography.h"
@@ -12,14 +12,14 @@
#error "This file requires ARC support."
#endif
-@interface ContentSuggestionsItem ()
+@interface ContentSuggestionsTextItem ()
@property(nonatomic, copy) NSString* title;
@property(nonatomic, copy) NSString* subtitle;
@end
-@implementation ContentSuggestionsItem
+@implementation ContentSuggestionsTextItem
@synthesize title = _title;
@synthesize subtitle = _subtitle;
@@ -29,7 +29,7 @@
subtitle:(NSString*)subtitle {
self = [super initWithType:type];
if (self) {
- self.cellClass = [ContentSuggestionsCell class];
+ self.cellClass = [ContentSuggestionsTextCell class];
_title = [title copy];
_subtitle = [subtitle copy];
}
@@ -38,7 +38,7 @@
#pragma mark - CollectionViewItem
-- (void)configureCell:(ContentSuggestionsCell*)cell {
+- (void)configureCell:(ContentSuggestionsTextCell*)cell {
[super configureCell:cell];
[cell.titleButton setTitle:self.title forState:UIControlStateNormal];
cell.detailTextLabel.text = self.subtitle;
@@ -46,9 +46,9 @@
@end
-#pragma mark - ContentSuggestionsCell
+#pragma mark - ContentSuggestionsTextCell
-@implementation ContentSuggestionsCell
+@implementation ContentSuggestionsTextCell
@synthesize titleButton = _titleButton;
@synthesize detailTextLabel = _detailTextLabel;
@@ -61,7 +61,7 @@
_titleButton.titleLabel.font = [fontLoader mediumFontOfSize:16];
_titleButton.titleLabel.textColor = [[MDCPalette greyPalette] tint900];
[_titleButton addTarget:nil
- action:@selector(addNewItem:)
+ action:@selector(addNewTextItem:)
forControlEvents:UIControlEventTouchUpInside];
_detailTextLabel = [[UILabel alloc] init];

Powered by Google App Engine
This is Rietveld 408576698