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

Unified Diff: ui/gfx/break_list.h

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 | « ui/base/range/range_win_unittest.cc ('k') | ui/gfx/break_list_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/break_list.h
diff --git a/ui/gfx/break_list.h b/ui/gfx/break_list.h
index 770386e9020695d851c4e30ca1d2ebf576060d88..932d5452708da5d4a83604fd0f67f948c4af7118 100644
--- a/ui/gfx/break_list.h
+++ b/ui/gfx/break_list.h
@@ -10,7 +10,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
-#include "ui/base/range/range.h"
+#include "ui/gfx/range/range.h"
namespace gfx {
@@ -40,7 +40,7 @@ class BreakList {
void SetValue(T value);
// Adjust the breaks to apply |value| over the supplied |range|.
- void ApplyValue(T value, const ui::Range& range);
+ void ApplyValue(T value, const gfx::Range& range);
// Set the max position and trim any breaks at or beyond that position.
void SetMax(size_t max);
@@ -51,7 +51,7 @@ class BreakList {
// Get the range of the supplied break; returns the break's start position and
// the next break's start position (or |max_| for the terminal break).
- ui::Range GetRange(const typename BreakList<T>::const_iterator& i) const;
+ gfx::Range GetRange(const typename BreakList<T>::const_iterator& i) const;
// Comparison functions for testing purposes.
bool EqualsValueForTesting(T value) const;
@@ -82,12 +82,12 @@ void BreakList<T>::SetValue(T value) {
}
template<class T>
-void BreakList<T>::ApplyValue(T value, const ui::Range& range) {
+void BreakList<T>::ApplyValue(T value, const gfx::Range& range) {
if (!range.IsValid() || range.is_empty())
return;
DCHECK(!breaks_.empty());
DCHECK(!range.is_reversed());
- DCHECK(ui::Range(0, max_).Contains(range));
+ DCHECK(gfx::Range(0, max_).Contains(range));
// Erase any breaks in |range|, then add start and end breaks as needed.
typename std::vector<Break>::iterator start = GetBreak(range.start());
@@ -135,10 +135,10 @@ typename std::vector<std::pair<size_t, T> >::const_iterator
}
template<class T>
-ui::Range BreakList<T>::GetRange(
+gfx::Range BreakList<T>::GetRange(
const typename BreakList<T>::const_iterator& i) const {
const typename BreakList<T>::const_iterator next = i + 1;
- return ui::Range(i->first, next == breaks_.end() ? max_ : next->first);
+ return gfx::Range(i->first, next == breaks_.end() ? max_ : next->first);
}
template<class T>
« no previous file with comments | « ui/base/range/range_win_unittest.cc ('k') | ui/gfx/break_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698