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

Side by Side Diff: ios/chrome/browser/ui/history/favicon_view_provider.mm

Issue 2912863005: Use MDCTypography instead of MDFRobotoFontLoader directly. (Closed)
Patch Set: Tentative fix for ManualTextFramerTest 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
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/history/favicon_view_provider.h" 5 #import "ios/chrome/browser/ui/history/favicon_view_provider.h"
6 6
7 #include "base/i18n/case_conversion.h" 7 #include "base/i18n/case_conversion.h"
8 #include "base/mac/bind_objc_block.h" 8 #include "base/mac/bind_objc_block.h"
9 #import "base/mac/foundation_util.h" 9 #import "base/mac/foundation_util.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
11 #include "base/strings/sys_string_conversions.h" 11 #include "base/strings/sys_string_conversions.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "base/task/cancelable_task_tracker.h" 13 #include "base/task/cancelable_task_tracker.h"
14 #include "components/favicon/core/fallback_url_util.h" 14 #include "components/favicon/core/fallback_url_util.h"
15 #include "components/favicon/core/large_icon_service.h" 15 #include "components/favicon/core/large_icon_service.h"
16 #include "components/favicon_base/fallback_icon_style.h" 16 #include "components/favicon_base/fallback_icon_style.h"
17 #include "components/favicon_base/favicon_types.h" 17 #include "components/favicon_base/favicon_types.h"
18 #import "ios/chrome/browser/ui/history/favicon_view.h" 18 #import "ios/chrome/browser/ui/history/favicon_view.h"
19 #import "ios/third_party/material_roboto_font_loader_ios/src/src/MaterialRobotoF ontLoader.h" 19 #import "ios/third_party/material_components_ios/src/components/Typography/src/M aterialTypography.h"
20 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 20 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
21 #include "skia/ext/skia_utils_ios.h" 21 #include "skia/ext/skia_utils_ios.h"
22 #include "url/gurl.h" 22 #include "url/gurl.h"
23 23
24 #if !defined(__has_feature) || !__has_feature(objc_arc) 24 #if !defined(__has_feature) || !__has_feature(objc_arc)
25 #error "This file requires ARC support." 25 #error "This file requires ARC support."
26 #endif 26 #endif
27 27
28 @interface FaviconViewProvider () { 28 @interface FaviconViewProvider () {
29 // Delegate for handling completion of favicon load. 29 // Delegate for handling completion of favicon load.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 _faviconView.faviconImage.backgroundColor = [UIColor whiteColor]; 140 _faviconView.faviconImage.backgroundColor = [UIColor whiteColor];
141 _faviconView.faviconFallbackLabel.text = nil; 141 _faviconView.faviconFallbackLabel.text = nil;
142 } else { 142 } else {
143 _faviconView.faviconImage.image = nil; 143 _faviconView.faviconImage.image = nil;
144 _faviconView.faviconImage.backgroundColor = self.fallbackBackgroundColor; 144 _faviconView.faviconImage.backgroundColor = self.fallbackBackgroundColor;
145 _faviconView.faviconFallbackLabel.text = self.fallbackText; 145 _faviconView.faviconFallbackLabel.text = self.fallbackText;
146 _faviconView.faviconFallbackLabel.textColor = self.fallbackTextColor; 146 _faviconView.faviconFallbackLabel.textColor = self.fallbackTextColor;
147 147
148 CGFloat fontSize = floorf(_faviconSize / 2); 148 CGFloat fontSize = floorf(_faviconSize / 2);
149 _faviconView.faviconFallbackLabel.font = 149 _faviconView.faviconFallbackLabel.font =
150 [[MDFRobotoFontLoader sharedInstance] regularFontOfSize:fontSize]; 150 [[MDCTypography fontLoader] regularFontOfSize:fontSize];
151 } 151 }
152 return _faviconView; 152 return _faviconView;
153 } 153 }
154 154
155 @end 155 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/first_run/welcome_to_chrome_view.mm ('k') | ios/chrome/browser/ui/history/history_entry_item.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698