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

Unified Diff: ui/message_center/views/bounded_label.cc

Issue 23731010: Move text_elider to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update3 Created 7 years, 3 months 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 | « ui/message_center/cocoa/notification_controller.mm ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/bounded_label.cc
diff --git a/ui/message_center/views/bounded_label.cc b/ui/message_center/views/bounded_label.cc
index 6752795390e07201fdb4d3a93c87ec6eea667a72..1fe428a314f4f5c60afc101c23e053274c7ed16e 100644
--- a/ui/message_center/views/bounded_label.cc
+++ b/ui/message_center/views/bounded_label.cc
@@ -8,8 +8,8 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
-#include "ui/base/text/text_elider.h"
#include "ui/gfx/canvas.h"
+#include "ui/gfx/text_elider.h"
#include "ui/views/controls/label.h"
namespace {
@@ -143,18 +143,18 @@ std::vector<string16> InnerBoundedLabel::GetWrappedText(int width, int lines) {
// Wrap, using INT_MAX for -1 widths that indicate no wrapping.
std::vector<string16> wrapped;
- ui::ElideRectangleText(text(), font(),
+ gfx::ElideRectangleText(text(), font(),
(width < 0) ? std::numeric_limits<int>::max() : width,
- height, ui::WRAP_LONG_WORDS, &wrapped);
+ height, gfx::WRAP_LONG_WORDS, &wrapped);
// Elide if necessary.
if (lines > 0 && wrapped.size() > static_cast<unsigned int>(lines)) {
// Add an ellipsis to the last line. If this ellipsis makes the last line
- // too wide, that line will be further elided by the ui::ElideText below,
+ // too wide, that line will be further elided by the gfx::ElideText below,
// so for example "ABC" could become "ABC..." and then "AB...".
- string16 last = wrapped[lines - 1] + UTF8ToUTF16(ui::kEllipsis);
+ string16 last = wrapped[lines - 1] + UTF8ToUTF16(gfx::kEllipsis);
if (width > 0 && font().GetStringWidth(last) > width)
- last = ui::ElideText(last, font(), width, ui::ELIDE_AT_END);
+ last = gfx::ElideText(last, font(), width, gfx::ELIDE_AT_END);
wrapped.resize(lines - 1);
wrapped.push_back(last);
}
« no previous file with comments | « ui/message_center/cocoa/notification_controller.mm ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698