diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-22 18:15:25 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-22 18:15:25 +0000 |
commit | 36f1e277205d0bc6621866b1242ea7ee00166d4a (patch) | |
tree | 9d9fa8d67e2c2a4d5be66a99a04aa45d6fa9b58a /chrome/browser | |
parent | 27a64faaaa8a1d23826794a5763d34cac5fbf9fe (diff) | |
download | chromium_src-36f1e277205d0bc6621866b1242ea7ee00166d4a.zip chromium_src-36f1e277205d0bc6621866b1242ea7ee00166d4a.tar.gz chromium_src-36f1e277205d0bc6621866b1242ea7ee00166d4a.tar.bz2 |
Convert SizeStringInt from taking a wstring to a string16.
BUG=23581
Review URL: http://codereview.chromium.org/5158006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/chromeos/login/username_view.cc | 3 | ||||
-rw-r--r-- | chrome/browser/ui/views/sad_tab_view.cc | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/login/username_view.cc b/chrome/browser/chromeos/login/username_view.cc index 750c788..efc1976 100644 --- a/chrome/browser/chromeos/login/username_view.cc +++ b/chrome/browser/chromeos/login/username_view.cc @@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/login/username_view.h" #include "base/logging.h" +#include "base/utf_string_conversions.h" #include "gfx/canvas.h" #include "gfx/canvas_skia.h" #include "gfx/rect.h" @@ -78,7 +79,7 @@ void UsernameView::PaintUsername(const gfx::Rect& bounds) { gfx::Canvas::TEXT_VALIGN_MIDDLE | gfx::Canvas::NO_ELLIPSIS; int text_height; - gfx::CanvasSkia::SizeStringInt(GetText(), font(), + gfx::CanvasSkia::SizeStringInt(WideToUTF16Hack(GetText()), font(), &text_width_, &text_height, flags); text_width_ = std::min(text_width_, bounds.width() - margin_width_); diff --git a/chrome/browser/ui/views/sad_tab_view.cc b/chrome/browser/ui/views/sad_tab_view.cc index f8a48a9..8849f4b 100644 --- a/chrome/browser/ui/views/sad_tab_view.cc +++ b/chrome/browser/ui/views/sad_tab_view.cc @@ -6,6 +6,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/google/google_util.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/tab_contents/tab_contents_delegate.h" @@ -95,8 +96,8 @@ void SadTabView::Layout() { gfx::CanvasSkia cc(0, 0, true); int message_width = static_cast<int>(width() * kMessageSize); int message_height = 0; - cc.SizeStringInt(message_, *message_font_, &message_width, &message_height, - gfx::Canvas::MULTI_LINE); + cc.SizeStringInt(WideToUTF16Hack(message_), *message_font_, &message_width, + &message_height, gfx::Canvas::MULTI_LINE); int message_x = (width() - message_width) / 2; int message_y = title_bounds_.bottom() + kTitleMessageSpacing; message_bounds_.SetRect(message_x, message_y, message_width, message_height); |