diff options
Diffstat (limited to 'chrome/browser/ui/cocoa')
4 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm index 1d2fb2d..c797992 100644 --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm @@ -27,7 +27,7 @@ const NSUInteger kMaximumMenuPixelsWide = 300; + (NSString*)menuTitleForNode:(const BookmarkNode*)node { NSFont* nsfont = [NSFont menuBarFontOfSize:0]; // 0 means "default" - gfx::Font font(base::SysNSStringToWide([nsfont fontName]), + gfx::Font font(base::SysNSStringToUTF16([nsfont fontName]), static_cast<int>([nsfont pointSize])); string16 title = gfx::ElideText(node->GetTitle(), font, diff --git a/chrome/browser/ui/cocoa/download/download_item_cell.mm b/chrome/browser/ui/cocoa/download/download_item_cell.mm index db5d5fa..586252d 100644 --- a/chrome/browser/ui/cocoa/download/download_item_cell.mm +++ b/chrome/browser/ui/cocoa/download/download_item_cell.mm @@ -394,7 +394,7 @@ NSGradient* BackgroundTheme::GetNSGradient(int id) const { - (NSString*)elideTitle:(int)availableWidth { NSFont* font = [self font]; - gfx::Font font_chr(base::SysNSStringToWide([font fontName]), + gfx::Font font_chr(base::SysNSStringToUTF16([font fontName]), [font pointSize]); return base::SysUTF16ToNSString( @@ -403,7 +403,7 @@ NSGradient* BackgroundTheme::GetNSGradient(int id) const { - (NSString*)elideStatus:(int)availableWidth { NSFont* font = [self secondaryFont]; - gfx::Font font_chr(base::SysNSStringToWide([font fontName]), + gfx::Font font_chr(base::SysNSStringToUTF16([font fontName]), [font pointSize]); return base::SysUTF16ToNSString(ElideText( diff --git a/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm b/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm index ad384f9..79d794b 100644 --- a/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm +++ b/chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm @@ -89,7 +89,7 @@ CGFloat EVBubbleDecoration::GetWidthForSpace(CGFloat width) { // Middle-elide the label to fit |width_left|. This leaves the // prefix and the trailing country code in place. - gfx::Font font(base::SysNSStringToWide([font_ fontName]), + gfx::Font font(base::SysNSStringToUTF16([font_ fontName]), [font_ pointSize]); NSString* elided_label = base::SysUTF16ToNSString( ElideText(base::SysNSStringToUTF16(full_label_), font, width_left, true)); diff --git a/chrome/browser/ui/cocoa/status_bubble_mac.mm b/chrome/browser/ui/cocoa/status_bubble_mac.mm index 685096d..ffc0cb9 100644 --- a/chrome/browser/ui/cocoa/status_bubble_mac.mm +++ b/chrome/browser/ui/cocoa/status_bubble_mac.mm @@ -148,7 +148,7 @@ void StatusBubbleMac::SetURL(const GURL& url, const string16& languages) { scaled_width = [[parent_ contentView] convertSize:scaled_width fromView:nil]; text_width = static_cast<int>(scaled_width.width); NSFont* font = [[window_ contentView] font]; - gfx::Font font_chr(base::SysNSStringToWide([font fontName]), + gfx::Font font_chr(base::SysNSStringToUTF16([font fontName]), [font pointSize]); string16 original_url_text = net::FormatUrl(url, UTF16ToUTF8(languages)); @@ -606,7 +606,7 @@ void StatusBubbleMac::ExpandBubble() { // Generate the URL string that fits in the expanded bubble. NSFont* font = [[window_ contentView] font]; - gfx::Font font_chr(base::SysNSStringToWide([font fontName]), + gfx::Font font_chr(base::SysNSStringToUTF16([font fontName]), [font pointSize]); string16 expanded_url = gfx::ElideUrl(url_, font_chr, max_bubble_width, UTF16ToWideHack(languages_)); |