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

Unified Diff: chrome/browser/ui/cocoa/browser/password_generation_bubble_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/browser/password_generation_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/browser/password_generation_bubble_controller.mm b/chrome/browser/ui/cocoa/browser/password_generation_bubble_controller.mm
index 70653d4dd30823efcfb13ddf6d653e7f035f45fd..de00729ffcafd8ead294bf90b2bb390119a4b518 100644
--- a/chrome/browser/ui/cocoa/browser/password_generation_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/password_generation_bubble_controller.mm
@@ -23,6 +23,7 @@
#import "ui/base/cocoa/tracking_area.h"
#include "ui/base/l10n/l10n_util_mac.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/gfx/font_list.h"
namespace {
@@ -327,7 +328,7 @@ const CGFloat kIconSize = 26.0;
- (void)performLayout {
NSView* contentView = [[self window] contentView];
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
textField_ = [[[PasswordGenerationTextField alloc]
initWithFrame:NSMakeRect(kBorderSize,
@@ -338,9 +339,9 @@ const CGFloat kIconSize = 26.0;
normalImage:rb.GetNativeImageNamed(IDR_RELOAD_DIMMED).ToNSImage()
hoverImage:rb.GetNativeImageNamed(IDR_RELOAD)
.ToNSImage()] autorelease];
- gfx::Font smallBoldFont =
- rb.GetFont(ResourceBundle::SmallFont).DeriveFont(0, gfx::Font::BOLD);
- [textField_ setFont:smallBoldFont.GetNativeFont()];
+ const gfx::FontList& smallBoldFont =
+ rb.GetFontList(ui::ResourceBundle::SmallBoldFont);
+ [textField_ setFont:smallBoldFont.GetPrimaryFont().GetNativeFont()];
[textField_
setStringValue:base::SysUTF8ToNSString(passwordGenerator_->Generate())];
[textField_ setDelegate:self];

Powered by Google App Engine
This is Rietveld 408576698