summaryrefslogtreecommitdiffstats
path: root/views/widget
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-21 22:02:55 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-21 22:02:55 +0000
commitd6b671d0968013c3205c50ebaf45f356e34a58c5 (patch)
tree52b215053c36e30e97de5ff97edb309700735ef0 /views/widget
parentc5af1c1af7e02b4998b085d29ecf8249f679e50a (diff)
downloadchromium_src-d6b671d0968013c3205c50ebaf45f356e34a58c5.zip
chromium_src-d6b671d0968013c3205c50ebaf45f356e34a58c5.tar.gz
chromium_src-d6b671d0968013c3205c50ebaf45f356e34a58c5.tar.bz2
Convert gfx::ElideText from using wstrings to string16.
BUG=23581 Review URL: http://codereview.chromium.org/3885003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget')
-rw-r--r--views/widget/tooltip_manager.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/views/widget/tooltip_manager.cc b/views/widget/tooltip_manager.cc
index 39ccab8..5c400eb9 100644
--- a/views/widget/tooltip_manager.cc
+++ b/views/widget/tooltip_manager.cc
@@ -7,6 +7,7 @@
#include <vector>
#include "app/text_elider.h"
+#include "base/utf_string_conversions.h"
namespace views {
@@ -57,7 +58,8 @@ void TooltipManager::TrimTooltipToFit(std::wstring* text,
std::wstring result;
for (std::vector<std::wstring>::iterator i = lines.begin(); i != lines.end();
++i) {
- std::wstring elided_text = gfx::ElideText(*i, font, available_width, false);
+ std::wstring elided_text = UTF16ToWideHack(gfx::ElideText(WideToUTF16Hack(
+ *i), font, available_width, false));
*max_width = std::max(*max_width, font.GetStringWidth(elided_text));
if (i == lines.begin() && i + 1 == lines.end()) {
*text = elided_text;