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

Unified Diff: views/controls/button/text_button.cc

Issue 5158006: Convert SizeStringInt from taking a wstring to a string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac Created 10 years, 1 month 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
« no previous file with comments | « gfx/platform_font_win.cc ('k') | views/controls/label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/button/text_button.cc
diff --git a/views/controls/button/text_button.cc b/views/controls/button/text_button.cc
index f758910b9dce71efb04f5aa16d48c9d312c547be..c0208bc9901c0f5b0f4cf747beca1407c24d620a 100644
--- a/views/controls/button/text_button.cc
+++ b/views/controls/button/text_button.cc
@@ -8,6 +8,7 @@
#include "app/throb_animation.h"
#include "app/resource_bundle.h"
+#include "base/utf_string_conversions.h"
#include "gfx/canvas_skia.h"
#include "views/controls/button/button.h"
#include "views/event.h"
@@ -401,7 +402,7 @@ void TextButton::UpdateColor() {
void TextButton::UpdateTextSize() {
int width = 0, height = 0;
gfx::CanvasSkia::SizeStringInt(
- text_, font_, &width, &height,
+ WideToUTF16Hack(text_), font_, &width, &height,
gfx::Canvas::NO_ELLIPSIS | PrefixTypeToCanvasType(prefix_type_));
// Add 2 extra pixels to width and height when text halo is used.
« no previous file with comments | « gfx/platform_font_win.cc ('k') | views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698