summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-12 14:37:16 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-12 14:37:16 +0000
commit3f891cf79f72f4768a15bfae051e08b9211ed8c3 (patch)
tree3cf8d59e7186889184f575fcbe3284e6400fb505 /chrome/browser
parente0c7405b8f24e6c0096285446f94f729e63107df (diff)
downloadchromium_src-3f891cf79f72f4768a15bfae051e08b9211ed8c3.zip
chromium_src-3f891cf79f72f4768a15bfae051e08b9211ed8c3.tar.gz
chromium_src-3f891cf79f72f4768a15bfae051e08b9211ed8c3.tar.bz2
Remove wstring from gfx.
BUG=68882 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6121004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71167 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_mac.mm2
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_mac_unittest.mm2
-rw-r--r--chrome/browser/chromeos/dom_ui/menu_ui.cc26
-rw-r--r--chrome/browser/chromeos/drop_shadow_label.cc9
-rw-r--r--chrome/browser/chromeos/login/oobe_progress_bar.cc2
-rw-r--r--chrome/browser/chromeos/login/username_view.cc8
-rw-r--r--chrome/browser/chromeos/panels/panel_scroller_header.cc8
-rw-r--r--chrome/browser/gtk/bookmark_utils_gtk.cc3
-rw-r--r--chrome/browser/gtk/options/fonts_page_gtk.cc6
-rw-r--r--chrome/browser/gtk/tabs/tab_renderer_gtk.cc2
-rw-r--r--chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc4
-rw-r--r--chrome/browser/remoting/setup_flow.cc2
-rw-r--r--chrome/browser/sync/sync_setup_flow.cc2
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_cell.mm4
-rw-r--r--chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm2
-rw-r--r--chrome/browser/ui/cocoa/status_bubble_mac.mm4
-rw-r--r--chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc4
-rw-r--r--chrome/browser/ui/views/download_item_view.cc7
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.cc2
-rw-r--r--chrome/browser/ui/views/location_bar/content_setting_image_view.cc2
-rw-r--r--chrome/browser/ui/views/sad_tab_view.cc10
-rw-r--r--chrome/browser/ui/views/status_bubble_views.cc2
-rw-r--r--chrome/browser/ui/views/tabs/base_tab.cc2
-rw-r--r--chrome/browser/ui/views/theme_install_bubble_view.cc2
25 files changed, 60 insertions, 59 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
index d0b84e7..20a979e 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
@@ -449,7 +449,7 @@ void AutocompletePopupViewMac::UpdatePopupAppearance() {
// The popup's font is a slightly smaller version of the field's.
NSFont* fieldFont = AutocompleteEditViewMac::GetFieldFont();
const CGFloat resultFontSize = [fieldFont pointSize] + kEditFontAdjust;
- gfx::Font resultFont(base::SysNSStringToWide([fieldFont fontName]),
+ gfx::Font resultFont(base::SysNSStringToUTF16([fieldFont fontName]),
static_cast<int>(resultFontSize));
AutocompleteMatrix* matrix = GetAutocompleteMatrix();
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac_unittest.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac_unittest.mm
index 82d30e8..0e1bab7 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_mac_unittest.mm
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac_unittest.mm
@@ -27,7 +27,7 @@ class AutocompletePopupViewMacTest : public PlatformTest {
color_ = [NSColor blackColor];
dimColor_ = [NSColor darkGrayColor];
font_ = gfx::Font(
- base::SysNSStringToWide([[NSFont userFontOfSize:12] fontName]), 12);
+ base::SysNSStringToUTF16([[NSFont userFontOfSize:12] fontName]), 12);
}
// Returns the length of the run starting at |location| for which
diff --git a/chrome/browser/chromeos/dom_ui/menu_ui.cc b/chrome/browser/chromeos/dom_ui/menu_ui.cc
index 65536d9..70f49b9 100644
--- a/chrome/browser/chromeos/dom_ui/menu_ui.cc
+++ b/chrome/browser/chromeos/dom_ui/menu_ui.cc
@@ -43,30 +43,30 @@ namespace {
const int kNoExtraResource = -1;
// A utility function that generates css font property from gfx::Font.
-std::wstring GetFontShorthand(const gfx::Font* font) {
- std::wstring out;
+// NOTE: Returns UTF-8.
+std::string GetFontShorthand(const gfx::Font* font) {
+ std::string out;
if (font == NULL) {
font = &(views::MenuConfig::instance().font);
}
if (font->GetStyle() & gfx::Font::BOLD) {
- out.append(L"bold ");
+ out.append("bold ");
}
if (font->GetStyle() & gfx::Font::ITALIC) {
- out.append(L"italic ");
+ out.append("italic ");
}
if (font->GetStyle() & gfx::Font::UNDERLINED) {
- out.append(L"underline ");
+ out.append("underline ");
}
// TODO(oshima): The font size from gfx::Font is too small when
// used in webkit. Figure out the reason.
- out.append(ASCIIToWide(base::IntToString(font->GetFontSize() + 4)));
- out.append(L"px/");
- out.append(ASCIIToWide(base::IntToString(
- std::max(kFavIconSize, font->GetHeight()))));
- out.append(L"px \"");
- out.append(font->GetFontName());
- out.append(L"\",sans-serif");
+ out.append(base::IntToString(font->GetFontSize() + 4));
+ out.append("px/");
+ out.append(base::IntToString(std::max(kFavIconSize, font->GetHeight())));
+ out.append("px \"");
+ out.append(UTF16ToUTF8(font->GetFontName()));
+ out.append("\",sans-serif");
return out;
}
@@ -619,7 +619,7 @@ DictionaryValue* MenuUI::CreateMenuItem(const menus::MenuModel* model,
item->SetBoolean("checked", model->IsItemCheckedAt(index));
item->SetInteger("command_id", model->GetCommandIdAt(index));
item->SetString(
- "font", WideToUTF16(GetFontShorthand(model->GetLabelFontAt(index))));
+ "font", GetFontShorthand(model->GetLabelFontAt(index)));
SkBitmap icon;
if (model->GetIconAt(index, &icon) && !icon.isNull() && !icon.empty()) {
item->SetString("icon", dom_ui_util::GetImageDataUrl(icon));
diff --git a/chrome/browser/chromeos/drop_shadow_label.cc b/chrome/browser/chromeos/drop_shadow_label.cc
index 5c5fa30..4876643 100644
--- a/chrome/browser/chromeos/drop_shadow_label.cc
+++ b/chrome/browser/chromeos/drop_shadow_label.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/chromeos/drop_shadow_label.h"
+#include "base/utf_string_conversions.h"
#include "gfx/canvas.h"
#include "gfx/color_utils.h"
@@ -44,19 +45,19 @@ void DropShadowLabel::PaintText(gfx::Canvas* canvas,
SkColorGetG(kDefaultColor),
SkColorGetB(kDefaultColor));
for (int i = 0; i < drop_shadow_size_; i++) {
- canvas->DrawStringInt(text, font(), color,
+ canvas->DrawStringInt(WideToUTF16Hack(text), font(), color,
text_bounds.x() + i, text_bounds.y(),
text_bounds.width(), text_bounds.height(), flags);
- canvas->DrawStringInt(text, font(), color,
+ canvas->DrawStringInt(WideToUTF16Hack(text), font(), color,
text_bounds.x() + i, text_bounds.y() + i,
text_bounds.width(), text_bounds.height(), flags);
- canvas->DrawStringInt(text, font(), color,
+ canvas->DrawStringInt(WideToUTF16Hack(text), font(), color,
text_bounds.x(), text_bounds.y() + i,
text_bounds.width(), text_bounds.height(), flags);
}
}
- canvas->DrawStringInt(text, font(), GetColor(),
+ canvas->DrawStringInt(WideToUTF16Hack(text), font(), GetColor(),
text_bounds.x(), text_bounds.y(),
text_bounds.width(), text_bounds.height(), flags);
diff --git a/chrome/browser/chromeos/login/oobe_progress_bar.cc b/chrome/browser/chromeos/login/oobe_progress_bar.cc
index 82b50de..5eafe52 100644
--- a/chrome/browser/chromeos/login/oobe_progress_bar.cc
+++ b/chrome/browser/chromeos/login/oobe_progress_bar.cc
@@ -111,7 +111,7 @@ void OobeProgressBar::Paint(gfx::Canvas* canvas) {
next_x - ix, line_->height());
}
- std::wstring str = UTF16ToWide(l10n_util::GetStringUTF16(steps_[i]));
+ string16 str = l10n_util::GetStringUTF16(steps_[i]);
canvas->DrawStringInt(str, font_, color,
x + kTextPadding, y + dot->height() + kTextPadding,
(next_x - x - 2 * kTextPadding),
diff --git a/chrome/browser/chromeos/login/username_view.cc b/chrome/browser/chromeos/login/username_view.cc
index 5206901..b454b2f 100644
--- a/chrome/browser/chromeos/login/username_view.cc
+++ b/chrome/browser/chromeos/login/username_view.cc
@@ -155,10 +155,10 @@ void UsernameView::PaintUsername(const gfx::Rect& bounds) {
// Note, direct call of the DrawStringInt method produces the green dots
// along the text perimeter (when the label is place on the white background).
SkColor kInvisibleHaloColor = 0x00000000;
- canvas.DrawStringWithHalo(GetText(), font(), GetColor(), kInvisibleHaloColor,
- bounds.x() + margin_width_, bounds.y(),
- bounds.width() - 2 * margin_width_, bounds.height(),
- flags);
+ canvas.DrawStringWithHalo(WideToUTF16Hack(GetText()), font(), GetColor(),
+ kInvisibleHaloColor, bounds.x() + margin_width_,
+ bounds.y(), bounds.width() - 2 * margin_width_,
+ bounds.height(), flags);
text_image_.reset(new SkBitmap(canvas.ExtractBitmap()));
diff --git a/chrome/browser/chromeos/panels/panel_scroller_header.cc b/chrome/browser/chromeos/panels/panel_scroller_header.cc
index f6dceea..d4ef8fb 100644
--- a/chrome/browser/chromeos/panels/panel_scroller_header.cc
+++ b/chrome/browser/chromeos/panels/panel_scroller_header.cc
@@ -1,6 +1,6 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
#include "chrome/browser/chromeos/panels/panel_scroller_header.h"
@@ -45,6 +45,6 @@ void PanelScrollerHeader::Paint(gfx::Canvas* canvas) {
gfx::Font font =
rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, gfx::Font::BOLD);
int font_top = 1;
- canvas->DrawStringInt(UTF16ToWideHack(title_), font, 0xFF000000, 3, font_top,
+ canvas->DrawStringInt(title_, font, 0xFF000000, 3, font_top,
size().width(), size().height() - font_top);
}
diff --git a/chrome/browser/gtk/bookmark_utils_gtk.cc b/chrome/browser/gtk/bookmark_utils_gtk.cc
index 62acc14..e6d164a 100644
--- a/chrome/browser/gtk/bookmark_utils_gtk.cc
+++ b/chrome/browser/gtk/bookmark_utils_gtk.cc
@@ -139,8 +139,7 @@ gboolean OnDragIconExpose(GtkWidget* sender,
int text_width = sender->allocation.width - text_x;
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont);
- canvas.DrawStringInt(UTF16ToWide(data->text),
- base_font, data->text_color,
+ canvas.DrawStringInt(data->text, base_font, data->text_color,
text_x, 0, text_width, sender->allocation.height);
return TRUE;
diff --git a/chrome/browser/gtk/options/fonts_page_gtk.cc b/chrome/browser/gtk/options/fonts_page_gtk.cc
index a3c2d4e..cbe39c3 100644
--- a/chrome/browser/gtk/options/fonts_page_gtk.cc
+++ b/chrome/browser/gtk/options/fonts_page_gtk.cc
@@ -24,14 +24,14 @@ std::string MakeFontName(std::string family_name, int pixel_size) {
// The given font might not be available (the default fonts we use are not
// installed by default on some distros). So figure out which font we are
// actually falling back to and display that. (See crbug.com/31381.)
- std::wstring actual_family_name = gfx::Font(
- UTF8ToWide(family_name), pixel_size).GetFontName();
+ string16 actual_family_name = gfx::Font(
+ UTF8ToUTF16(family_name), pixel_size).GetFontName();
std::string fontname;
// TODO(mattm): We can pass in the size in pixels (px), and the font button
// actually honors it, but when you open the selector it interprets it as
// points. See crbug.com/17857
base::SStringPrintf(&fontname, "%s, %dpx",
- WideToUTF8(actual_family_name).c_str(), pixel_size);
+ UTF16ToUTF8(actual_family_name).c_str(), pixel_size);
return fontname;
}
diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
index b3f1c91..3b5cb50 100644
--- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
@@ -813,7 +813,7 @@ void TabRendererGtk::PaintTitle(gfx::Canvas* canvas) {
SkColor title_color = IsSelected() ? selected_title_color_
: unselected_title_color_;
- canvas->DrawStringInt(UTF16ToWideHack(title), *title_font_, title_color,
+ canvas->DrawStringInt(title, *title_font_, title_color,
title_bounds_.x(), title_bounds_.y(),
title_bounds_.width(), title_bounds_.height());
}
diff --git a/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc b/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc
index da8d670..d49bbbd 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc
+++ b/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc
@@ -133,7 +133,7 @@ void CloudPrintSetupFlow::GetDOMMessageHandlers(
void CloudPrintSetupFlow::GetDialogSize(gfx::Size* size) const {
PrefService* prefs = profile_->GetPrefs();
gfx::Font approximate_web_font(
- UTF8ToWide(prefs->GetString(prefs::kWebKitSansSerifFontFamily)),
+ UTF8ToUTF16(prefs->GetString(prefs::kWebKitSansSerifFontFamily)),
prefs->GetInteger(prefs::kWebKitDefaultFontSize));
if (setup_done_) {
@@ -282,7 +282,7 @@ void CloudPrintSetupFlow::ShowSetupDone() {
if (dom_ui_) {
PrefService* prefs = profile_->GetPrefs();
gfx::Font approximate_web_font(
- UTF8ToWide(prefs->GetString(prefs::kWebKitSansSerifFontFamily)),
+ UTF8ToUTF16(prefs->GetString(prefs::kWebKitSansSerifFontFamily)),
prefs->GetInteger(prefs::kWebKitDefaultFontSize));
gfx::Size done_size = gfx::GetLocalizedContentsSizeForFont(
IDS_CLOUD_PRINT_SETUP_WIZARD_DONE_WIDTH_CHARS,
diff --git a/chrome/browser/remoting/setup_flow.cc b/chrome/browser/remoting/setup_flow.cc
index 6070f1f..4727cee 100644
--- a/chrome/browser/remoting/setup_flow.cc
+++ b/chrome/browser/remoting/setup_flow.cc
@@ -165,7 +165,7 @@ void SetupFlow::GetDOMMessageHandlers(
void SetupFlow::GetDialogSize(gfx::Size* size) const {
PrefService* prefs = profile_->GetPrefs();
gfx::Font approximate_web_font(
- UTF8ToWide(prefs->GetString(prefs::kWebKitSansSerifFontFamily)),
+ UTF8ToUTF16(prefs->GetString(prefs::kWebKitSansSerifFontFamily)),
prefs->GetInteger(prefs::kWebKitDefaultFontSize));
// TODO(pranavk) Replace the following SYNC resources with REMOTING Resources.
diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc
index adb06ea..083b8d8 100644
--- a/chrome/browser/sync/sync_setup_flow.cc
+++ b/chrome/browser/sync/sync_setup_flow.cc
@@ -373,7 +373,7 @@ SyncSetupFlow::~SyncSetupFlow() {
void SyncSetupFlow::GetDialogSize(gfx::Size* size) const {
PrefService* prefs = service_->profile()->GetPrefs();
gfx::Font approximate_web_font = gfx::Font(
- UTF8ToWide(prefs->GetString(prefs::kWebKitSansSerifFontFamily)),
+ UTF8ToUTF16(prefs->GetString(prefs::kWebKitSansSerifFontFamily)),
prefs->GetInteger(prefs::kWebKitDefaultFontSize));
*size = gfx::GetLocalizedContentsSizeForFont(
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_));
diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
index d381029..6e4360e 100644
--- a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
+++ b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
@@ -671,8 +671,8 @@ int AutocompleteResultView::DrawString(
for (Classifications::const_iterator j(i->classifications.begin());
j != i->classifications.end(); ++j) {
int left = mirroring_context_->mirrored_left_coord(x, x + j->pixel_width);
- canvas->DrawStringInt(j->text, *j->font, j->color, left, y,
- j->pixel_width, j->font->GetHeight(), flags);
+ canvas->DrawStringInt(WideToUTF16Hack(j->text), *j->font, j->color, left,
+ y, j->pixel_width, j->font->GetHeight(), flags);
x += j->pixel_width;
}
}
diff --git a/chrome/browser/ui/views/download_item_view.cc b/chrome/browser/ui/views/download_item_view.cc
index 9f190f9..d35725b 100644
--- a/chrome/browser/ui/views/download_item_view.cc
+++ b/chrome/browser/ui/views/download_item_view.cc
@@ -515,8 +515,9 @@ void DownloadItemView::Paint(gfx::Canvas* canvas) {
SkColorGetG(file_name_color)),
static_cast<int>(kDownloadItemLuminanceMod *
SkColorGetB(file_name_color)));
- canvas->DrawStringInt(status_text_, font_, file_name_color,
- mirrored_x, y, kTextWidth, font_.GetHeight());
+ canvas->DrawStringInt(WideToUTF16Hack(status_text_), font_,
+ file_name_color, mirrored_x, y, kTextWidth,
+ font_.GetHeight());
}
}
@@ -633,7 +634,7 @@ void DownloadItemView::Paint(gfx::Canvas* canvas) {
(box_height_ - font_.GetHeight()) / 2);
// Draw the file's name.
- canvas->DrawStringInt(UTF16ToWide(filename), font_,
+ canvas->DrawStringInt(filename, font_,
IsEnabled() ? file_name_color :
kFileNameDisabledColor,
mirrored_x, y, kTextWidth, font_.GetHeight());
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index 8d331cf..0a9cb38 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -712,7 +712,7 @@ void OpaqueBrowserFrameView::PaintTitleBar(gfx::Canvas* canvas) {
return;
}
if (delegate->ShouldShowWindowTitle()) {
- canvas->DrawStringInt(delegate->GetWindowTitle(),
+ canvas->DrawStringInt(WideToUTF16Hack(delegate->GetWindowTitle()),
BrowserFrame::GetTitleFont(),
SK_ColorWHITE, MirroredLeftPointForRect(title_bounds_),
title_bounds_.y(), title_bounds_.width(), title_bounds_.height());
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
index 92f1cb8..40bfff8 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
@@ -183,7 +183,7 @@ void ContentSettingImageView::Paint(gfx::Canvas* canvas) {
if (animation_in_progress_) {
// Paint text to the right of the icon.
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- canvas->DrawStringInt(UTF16ToWideHack(animated_text_),
+ canvas->DrawStringInt(animated_text_,
rb.GetFont(ResourceBundle::MediumFont), SK_ColorBLACK,
GetImageBounds().right() + kTextMarginPixels, y(),
width() - GetImageBounds().width(), height(),
diff --git a/chrome/browser/ui/views/sad_tab_view.cc b/chrome/browser/ui/views/sad_tab_view.cc
index 3c3abb6..62bbfd0 100644
--- a/chrome/browser/ui/views/sad_tab_view.cc
+++ b/chrome/browser/ui/views/sad_tab_view.cc
@@ -76,13 +76,13 @@ void SadTabView::Paint(gfx::Canvas* canvas) {
canvas->DrawBitmapInt(*sad_tab_bitmap_, icon_bounds_.x(), icon_bounds_.y());
- canvas->DrawStringInt(title_, *title_font_, kTitleColor, title_bounds_.x(),
- title_bounds_.y(), title_bounds_.width(),
- title_bounds_.height(),
+ canvas->DrawStringInt(WideToUTF16Hack(title_), *title_font_, kTitleColor,
+ title_bounds_.x(), title_bounds_.y(),
+ title_bounds_.width(), title_bounds_.height(),
gfx::Canvas::TEXT_ALIGN_CENTER);
- canvas->DrawStringInt(message_, *message_font_, kMessageColor,
- message_bounds_.x(), message_bounds_.y(),
+ canvas->DrawStringInt(WideToUTF16Hack(message_), *message_font_,
+ kMessageColor, message_bounds_.x(), message_bounds_.y(),
message_bounds_.width(), message_bounds_.height(),
gfx::Canvas::MULTI_LINE);
diff --git a/chrome/browser/ui/views/status_bubble_views.cc b/chrome/browser/ui/views/status_bubble_views.cc
index 6bf4d2f..0e77b8d 100644
--- a/chrome/browser/ui/views/status_bubble_views.cc
+++ b/chrome/browser/ui/views/status_bubble_views.cc
@@ -447,7 +447,7 @@ void StatusBubbleViews::StatusView::Paint(gfx::Canvas* canvas) {
(SkColorGetR(text_color) + SkColorGetR(toolbar_color)) / 2,
(SkColorGetG(text_color) + SkColorGetR(toolbar_color)) / 2,
(SkColorGetB(text_color) + SkColorGetR(toolbar_color)) / 2);
- canvas->DrawStringInt(UTF16ToWide(text_),
+ canvas->DrawStringInt(text_,
views::Label::font(),
text_color,
body_bounds.x(),
diff --git a/chrome/browser/ui/views/tabs/base_tab.cc b/chrome/browser/ui/views/tabs/base_tab.cc
index 61ccc35..9e1207c 100644
--- a/chrome/browser/ui/views/tabs/base_tab.cc
+++ b/chrome/browser/ui/views/tabs/base_tab.cc
@@ -406,7 +406,7 @@ void BaseTab::PaintTitle(gfx::Canvas* canvas, SkColor title_color) {
Browser::FormatTitleForDisplay(&title);
}
- canvas->DrawStringInt(UTF16ToWideHack(title), *font_, title_color,
+ canvas->DrawStringInt(title, *font_, title_color,
title_bounds().x(), title_bounds().y(),
title_bounds().width(), title_bounds().height());
}
diff --git a/chrome/browser/ui/views/theme_install_bubble_view.cc b/chrome/browser/ui/views/theme_install_bubble_view.cc
index 71e4171..8b7b30a 100644
--- a/chrome/browser/ui/views/theme_install_bubble_view.cc
+++ b/chrome/browser/ui/views/theme_install_bubble_view.cc
@@ -135,7 +135,7 @@ void ThemeInstallBubbleView::Paint(gfx::Canvas* canvas) {
body_bounds.set_x(MirroredLeftPointForRect(body_bounds));
SkColor text_color = SK_ColorWHITE;
- canvas->DrawStringInt(UTF16ToWideHack(text_),
+ canvas->DrawStringInt(text_,
views::Label::font(),
text_color,
body_bounds.x(),