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

Side by Side Diff: ios/chrome/browser/ui/content_suggestions/content_suggestions_footer_item.mm

Issue 2751653008: Add header for the Content Suggestions (Closed)
Patch Set: Address comment Created 3 years, 9 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_footer_it em.h" 5 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_footer_it em.h"
6 6
7 #import "ios/chrome/browser/ui/uikit_ui_util.h" 7 #import "ios/chrome/browser/ui/uikit_ui_util.h"
8 8
9 #if !defined(__has_feature) || !__has_feature(objc_arc) 9 #if !defined(__has_feature) || !__has_feature(objc_arc)
10 #error "This file requires ARC support." 10 #error "This file requires ARC support."
11 #endif 11 #endif
12 12
13 namespace { 13 namespace {
14 const CGFloat kMinimalCellHeight = 44; 14 const CGFloat kMinimalCellHeight = 44;
15 } 15 }
16 16
17 #pragma mark - ContentSuggestionsFooterItem 17 #pragma mark - ContentSuggestionsFooterItem
18 18
19 @interface ContentSuggestionsFooterItem () 19 @interface ContentSuggestionsFooterItem ()
20 20
21 @property(nonatomic, copy) NSString* title; 21 @property(nonatomic, copy) NSString* title;
22 @property(nonatomic, copy) ProceduralBlock block; 22 @property(nonatomic, copy) ProceduralBlock block;
23 23
24 @end 24 @end
25 25
26 @implementation ContentSuggestionsFooterItem 26 @implementation ContentSuggestionsFooterItem
27 27
28 @synthesize title = _title; 28 @synthesize title = _title;
29 @synthesize block = _block; 29 @synthesize block = _block;
30 @synthesize suggestionIdentifier = _suggestionIdentifier;
31 30
32 - (instancetype)initWithType:(NSInteger)type 31 - (instancetype)initWithType:(NSInteger)type
33 title:(NSString*)title 32 title:(NSString*)title
34 block:(ProceduralBlock)block { 33 block:(ProceduralBlock)block {
35 self = [super initWithType:type]; 34 self = [super initWithType:type];
36 if (self) { 35 if (self) {
37 self.cellClass = [ContentSuggestionsFooterCell class]; 36 self.cellClass = [ContentSuggestionsFooterCell class];
38 _title = [title copy]; 37 _title = [title copy];
39 _block = [block copy]; 38 _block = [block copy];
40 } 39 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 return self; 79 return self;
81 } 80 }
82 81
83 - (void)prepareForReuse { 82 - (void)prepareForReuse {
84 [self.button removeTarget:nil 83 [self.button removeTarget:nil
85 action:NULL 84 action:NULL
86 forControlEvents:UIControlEventAllEvents]; 85 forControlEvents:UIControlEventAllEvents];
87 } 86 }
88 87
89 @end 88 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698