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

Unified Diff: ash/system/user/tray_user.cc

Issue 24012002: Move Range code to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: d 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 | « no previous file | chrome/browser/chromeos/input_method/textinput_surroundingtext_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/user/tray_user.cc
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc
index 42bb55a8d2be08d76d83c47cfca60cf82c37a30c..172b3aac973fffe1cca00681b41de10ed0ad0ed6 100644
--- a/ash/system/user/tray_user.cc
+++ b/ash/system/user/tray_user.cc
@@ -37,7 +37,6 @@
#include "third_party/skia/include/core/SkPath.h"
#include "ui/aura/window.h"
#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/range/range.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/text/text_elider.h"
#include "ui/gfx/canvas.h"
@@ -45,6 +44,7 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia_operations.h"
#include "ui/gfx/insets.h"
+#include "ui/gfx/range/range.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/render_text.h"
#include "ui/gfx/size.h"
@@ -456,7 +456,7 @@ void PublicAccountUserDetails::Layout() {
contents_area.height(), ui::ELIDE_LONG_WORDS, &lines);
// Loop through the lines, creating a renderer for each.
gfx::Point position = contents_area.origin();
- ui::Range display_name(ui::Range::InvalidRange());
+ gfx::Range display_name(gfx::Range::InvalidRange());
for (std::vector<base::string16>::const_iterator it = lines.begin();
it != lines.end(); ++it) {
gfx::RenderText* line = gfx::RenderText::CreateInstance();
@@ -476,14 +476,14 @@ void PublicAccountUserDetails::Layout() {
if (!display_name.is_empty()) {
display_name.set_end(
it->find(kDisplayNameMark, display_name.start() + 1));
- ui::Range line_range(0, it->size());
+ gfx::Range line_range(0, it->size());
line->ApplyColor(kPublicAccountUserCardNameColor,
display_name.Intersect(line_range));
// Update the range for the next line.
if (display_name.end() >= line_range.end())
display_name.set_start(0);
else
- display_name = ui::Range::InvalidRange();
+ display_name = gfx::Range::InvalidRange();
}
lines_.push_back(line);
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/textinput_surroundingtext_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698