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

Side by Side Diff: ui/base/touch/selection_bound.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_TOUCH_SELECTION_BOUND_H_ 5 #ifndef UI_BASE_TOUCH_SELECTION_BOUND_H_
6 #define UI_BASE_TOUCH_SELECTION_BOUND_H_ 6 #define UI_BASE_TOUCH_SELECTION_BOUND_H_
7 7
8 #include "ui/base/ui_base_export.h" 8 #include "ui/base/ui_base_export.h"
9 #include "ui/gfx/geometry/point.h" 9 #include "ui/gfx/geometry/point.h"
10 #include "ui/gfx/geometry/point_f.h" 10 #include "ui/gfx/geometry/point_f.h"
11 11
12 namespace cc {
13 struct ViewportSelectionBound;
14 }
15
16 namespace gfx { 12 namespace gfx {
17 class Rect; 13 class Rect;
18 } 14 }
19 15
20 namespace ui { 16 namespace ui {
21 17
22 // Bound of a selection end-point. 18 // Bound of a selection end-point.
23 class UI_BASE_EXPORT SelectionBound { 19 class UI_BASE_EXPORT SelectionBound {
24 public: 20 public:
25 enum Type { 21 enum Type {
26 LEFT, 22 LEFT,
27 RIGHT, 23 RIGHT,
28 CENTER, 24 CENTER,
29 EMPTY, 25 EMPTY,
30 LAST = EMPTY 26 LAST = EMPTY
31 }; 27 };
32 28
33 SelectionBound(); 29 SelectionBound();
34 explicit SelectionBound(const cc::ViewportSelectionBound& bound); 30 SelectionBound(const SelectionBound& other);
35 ~SelectionBound(); 31 ~SelectionBound();
36 32
37 Type type() const { return type_; } 33 Type type() const { return type_; }
38 void set_type(Type value) { type_ = value; } 34 void set_type(Type value) { type_ = value; }
39 35
40 const gfx::PointF& edge_top() const { return edge_top_; } 36 const gfx::PointF& edge_top() const { return edge_top_; }
41 const gfx::Point& edge_top_rounded() const { return edge_top_rounded_; } 37 const gfx::Point& edge_top_rounded() const { return edge_top_rounded_; }
42 void SetEdgeTop(const gfx::PointF& value); 38 void SetEdgeTop(const gfx::PointF& value);
43 39
44 const gfx::PointF& edge_bottom() const { return edge_bottom_; } 40 const gfx::PointF& edge_bottom() const { return edge_bottom_; }
(...skipping 21 matching lines...) Expand all
66 const SelectionBound& rhs); 62 const SelectionBound& rhs);
67 UI_BASE_EXPORT bool operator!=(const SelectionBound& lhs, 63 UI_BASE_EXPORT bool operator!=(const SelectionBound& lhs,
68 const SelectionBound& rhs); 64 const SelectionBound& rhs);
69 65
70 UI_BASE_EXPORT gfx::Rect RectBetweenSelectionBounds(const SelectionBound& b1, 66 UI_BASE_EXPORT gfx::Rect RectBetweenSelectionBounds(const SelectionBound& b1,
71 const SelectionBound& b2); 67 const SelectionBound& b2);
72 68
73 } // namespace ui 69 } // namespace ui
74 70
75 #endif // UI_BASE_TOUCH_SELECTION_BOUND_H_ 71 #endif // UI_BASE_TOUCH_SELECTION_BOUND_H_
OLDNEW
« ui/base/BUILD.gn ('K') | « ui/base/android/DEPS ('k') | ui/base/touch/selection_bound.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698