| OLD | NEW |
| 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/suggestions/suggestions_favicon_internal_cell.h" | 5 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_favicon_i
nternal_cell.h" |
| 6 | 6 |
| 7 #import "ios/chrome/browser/ui/uikit_ui_util.h" | 7 #import "ios/chrome/browser/ui/uikit_ui_util.h" |
| 8 #import "ios/third_party/material_components_ios/src/components/Typography/src/M
aterialTypography.h" | 8 #import "ios/third_party/material_components_ios/src/components/Typography/src/M
aterialTypography.h" |
| 9 | 9 |
| 10 #if !defined(__has_feature) || !__has_feature(objc_arc) | 10 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 11 #error "This file requires ARC support." | 11 #error "This file requires ARC support." |
| 12 #endif | 12 #endif |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 const CGFloat kFaviconImageSize = 50; | 15 const CGFloat kFaviconImageSize = 50; |
| 16 const CGFloat kFontSize = 10; | 16 const CGFloat kFontSize = 10; |
| 17 } | 17 } |
| 18 | 18 |
| 19 @implementation SuggestionsFaviconInternalCell | 19 @implementation ContentSuggestionsFaviconInternalCell |
| 20 | 20 |
| 21 @synthesize faviconView = _faviconView; | 21 @synthesize faviconView = _faviconView; |
| 22 @synthesize titleLabel = _titleLabel; | 22 @synthesize titleLabel = _titleLabel; |
| 23 | 23 |
| 24 - (instancetype)initWithFrame:(CGRect)frame { | 24 - (instancetype)initWithFrame:(CGRect)frame { |
| 25 self = [super initWithFrame:frame]; | 25 self = [super initWithFrame:frame]; |
| 26 if (self) { | 26 if (self) { |
| 27 _faviconView = [[UIImageView alloc] init]; | 27 _faviconView = [[UIImageView alloc] init]; |
| 28 _titleLabel = [[UILabel alloc] init]; | 28 _titleLabel = [[UILabel alloc] init]; |
| 29 _titleLabel.numberOfLines = 2; | 29 _titleLabel.numberOfLines = 2; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 [super prepareForReuse]; | 61 [super prepareForReuse]; |
| 62 self.faviconView.image = nil; | 62 self.faviconView.image = nil; |
| 63 self.titleLabel.text = nil; | 63 self.titleLabel.text = nil; |
| 64 } | 64 } |
| 65 | 65 |
| 66 + (NSString*)reuseIdentifier { | 66 + (NSString*)reuseIdentifier { |
| 67 return @"faviconInternalCell"; | 67 return @"faviconInternalCell"; |
| 68 } | 68 } |
| 69 | 69 |
| 70 @end | 70 @end |
| OLD | NEW |