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

Side by Side Diff: ios/chrome/browser/ui/ntp/most_visited_cell.mm

Issue 2790463003: ntp_tiles: Cleanup enum names (Closed)
Patch Set: Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ntp/most_visited_cell.h" 5 #import "ios/chrome/browser/ui/ntp/most_visited_cell.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #import "base/ios/weak_nsobject.h" 9 #import "base/ios/weak_nsobject.h"
10 #include "base/mac/bind_objc_block.h" 10 #include "base/mac/bind_objc_block.h"
(...skipping 28 matching lines...) Expand all
39 const CGFloat kLabelTextColor = 0.314; 39 const CGFloat kLabelTextColor = 0.314;
40 const CGFloat kMaximumWidth = 73; 40 const CGFloat kMaximumWidth = 73;
41 const CGFloat kMaximumHeight = 100; 41 const CGFloat kMaximumHeight = 100;
42 42
43 @interface MostVisitedCell () { 43 @interface MostVisitedCell () {
44 // Backs property with the same name. 44 // Backs property with the same name.
45 GURL _URL; 45 GURL _URL;
46 // Weak reference to the relevant BrowserState. 46 // Weak reference to the relevant BrowserState.
47 ios::ChromeBrowserState* _browserState; 47 ios::ChromeBrowserState* _browserState;
48 // Backs property with the same name. 48 // Backs property with the same name.
49 ntp_tiles::metrics::MostVisitedTileType _tileType; 49 ntp_tiles::metrics::NTPTileType _tileType;
50 50
51 base::scoped_nsobject<UILabel> _label; 51 base::scoped_nsobject<UILabel> _label;
52 base::scoped_nsobject<UILabel> _noIconLabel; 52 base::scoped_nsobject<UILabel> _noIconLabel;
53 base::scoped_nsobject<UIImageView> _imageView; 53 base::scoped_nsobject<UIImageView> _imageView;
54 // Used to cancel tasks for the LargeIconService. 54 // Used to cancel tasks for the LargeIconService.
55 base::CancelableTaskTracker _cancelable_task_tracker; 55 base::CancelableTaskTracker _cancelable_task_tracker;
56 } 56 }
57 // Set the background color and center the first letter of the site title (or 57 // Set the background color and center the first letter of the site title (or
58 // domain if the title is a url). 58 // domain if the title is a url).
59 - (void)updateIconLabelWithColor:(UIColor*)textColor 59 - (void)updateIconLabelWithColor:(UIColor*)textColor
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 } 233 }
234 234
235 - (void)setImage:(UIImage*)image { 235 - (void)setImage:(UIImage*)image {
236 [_imageView setBackgroundColor:nil]; 236 [_imageView setBackgroundColor:nil];
237 [_noIconLabel setText:nil]; 237 [_noIconLabel setText:nil];
238 [_imageView setImage:image]; 238 [_imageView setImage:image];
239 _tileType = ntp_tiles::metrics::ICON_REAL; 239 _tileType = ntp_tiles::metrics::ICON_REAL;
240 } 240 }
241 241
242 @end 242 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698