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

Unified Diff: ui/base/touch/selection_bound.cc

Issue 908033003: Remove dependency from ui/base to cc on non-Android platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: ui/base/touch/selection_bound.cc
diff --git a/ui/base/touch/selection_bound.cc b/ui/base/touch/selection_bound.cc
index da606233e193a34d833a47eb9868f49803ce5a07..bd5b3c9c6beef999d944e58c6892cd446db8dbff 100644
--- a/ui/base/touch/selection_bound.cc
+++ b/ui/base/touch/selection_bound.cc
@@ -5,41 +5,16 @@
#include <algorithm>
#include "base/macros.h"
-#include "cc/output/viewport_selection_bound.h"
#include "ui/base/touch/selection_bound.h"
#include "ui/gfx/geometry/point_conversions.h"
#include "ui/gfx/geometry/rect.h"
namespace ui {
-namespace {
-
-SelectionBound::Type ConvertToSelectionBoundType(cc::SelectionBoundType type) {
- switch (type) {
- case cc::SELECTION_BOUND_LEFT:
- return SelectionBound::LEFT;
- case cc::SELECTION_BOUND_RIGHT:
- return SelectionBound::RIGHT;
- case cc::SELECTION_BOUND_CENTER:
- return SelectionBound::CENTER;
- case cc::SELECTION_BOUND_EMPTY:
- return SelectionBound::EMPTY;
- }
- NOTREACHED() << "Unknown selection bound type";
- return SelectionBound::EMPTY;
-}
-
-} // namespace
-
SelectionBound::SelectionBound() : type_(EMPTY), visible_(false) {
}
-SelectionBound::SelectionBound(const cc::ViewportSelectionBound& bound)
- : type_(ConvertToSelectionBoundType(bound.type)),
- visible_(bound.visible) {
- if (type_ != EMPTY)
- SetEdge(bound.edge_top, bound.edge_bottom);
-}
+SelectionBound::SelectionBound(const SelectionBound& other) = default;
SelectionBound::~SelectionBound() {
}
« ui/base/BUILD.gn ('K') | « ui/base/touch/selection_bound.h ('k') | ui/base/ui_base.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698