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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_loading_shield_controller.mm

Issue 152343006: Clean-up: Replaces obsolete Font/FontList methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 6 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: chrome/browser/ui/cocoa/autofill/autofill_loading_shield_controller.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_loading_shield_controller.mm b/chrome/browser/ui/cocoa/autofill/autofill_loading_shield_controller.mm
index ed253a063dad61bfc6e2f53ec7fd9037fb2e33fc..629c8ae9953d7ae23f6fc0c0cf60df21e602bd01 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_loading_shield_controller.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_loading_shield_controller.mm
@@ -11,6 +11,7 @@
#include "chrome/browser/ui/autofill/loading_animation.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/animation/animation_delegate.h"
+#include "ui/gfx/font_list.h"
namespace {
@@ -54,11 +55,12 @@ class AutofillLoadingAnimationBridge : public gfx::AnimationDelegate {
if (self = [super initWithNibName:nil bundle:nil]) {
delegate_ = delegate;
- gfx::Font font = ui::ResourceBundle::GetSharedInstance().
- GetFont(ui::ResourceBundle::BaseFont).DeriveFont(8);
- NSFont* native_font = font.GetNativeFont();
+ const gfx::FontList& font_list =
+ ui::ResourceBundle::GetSharedInstance().GetFontList(
+ ui::ResourceBundle::LargeFont);
+ NSFont* native_font = font_list.GetPrimaryFont().GetNativeFont();
animationDriver_.reset(
- new AutofillLoadingAnimationBridge(self, font.GetHeight()));
+ new AutofillLoadingAnimationBridge(self, font_list.GetHeight()));
base::scoped_nsobject<NSBox> view([[NSBox alloc] initWithFrame:NSZeroRect]);
[view setBoxType:NSBoxCustom];

Powered by Google App Engine
This is Rietveld 408576698