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

Unified Diff: ui/message_center/cocoa/notification_controller.mm

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/gfx/text_elider_unittest.cc ('k') | ui/message_center/views/bounded_label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/cocoa/notification_controller.mm
diff --git a/ui/message_center/cocoa/notification_controller.mm b/ui/message_center/cocoa/notification_controller.mm
index ab0187859abff637e2fb0fe9ca0f0fd9cc1b3822..59af20732599597f8aa155c4f6ec275b86417e57 100644
--- a/ui/message_center/cocoa/notification_controller.mm
+++ b/ui/message_center/cocoa/notification_controller.mm
@@ -14,7 +14,7 @@
#import "ui/base/cocoa/hover_image_button.h"
#include "ui/base/l10n/l10n_util_mac.h"
#include "ui/base/resource/resource_bundle.h"
-#include "ui/base/text/text_elider.h"
+#include "ui/gfx/text_elider.h"
#include "ui/message_center/message_center.h"
#include "ui/message_center/message_center_style.h"
#include "ui/message_center/notification.h"
@@ -697,15 +697,15 @@
int height = (lines + 1) * font.GetHeight();
std::vector<string16> wrapped;
- ui::ElideRectangleText(text, font, width, height,
- ui::WRAP_LONG_WORDS, &wrapped);
+ gfx::ElideRectangleText(text, font, width, height,
+ gfx::WRAP_LONG_WORDS, &wrapped);
if (wrapped.size() > 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.
- string16 last = wrapped[lines - 1] + UTF8ToUTF16(ui::kEllipsis);
+ // too wide, that line will be further elided by the gfx::ElideText below.
+ string16 last = wrapped[lines - 1] + UTF8ToUTF16(gfx::kEllipsis);
if (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/gfx/text_elider_unittest.cc ('k') | ui/message_center/views/bounded_label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698