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

Unified Diff: ui/base/touch/touch_editing_controller.h

Issue 138023004: Use local coordinates in TouchEditable interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added TODO for switching to screen coordinates Created 6 years, 11 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 | « content/browser/web_contents/touch_editable_impl_aura.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/touch/touch_editing_controller.h
diff --git a/ui/base/touch/touch_editing_controller.h b/ui/base/touch/touch_editing_controller.h
index 1c6a8fa92905a0d5b0d7834a61a6863ea20623a1..a48a045fc26c7babe47b51c59293ca9ccde4d93c 100644
--- a/ui/base/touch/touch_editing_controller.h
+++ b/ui/base/touch/touch_editing_controller.h
@@ -15,6 +15,9 @@ namespace ui {
// using touch.
class UI_BASE_EXPORT TouchEditable : public ui::SimpleMenuModel::Delegate {
public:
+ // TODO(mohsen): Consider switching from local coordinates to screen
+ // coordinates in this interface and see if it will simplify things.
+
// Select everything between start and end (points are in view's local
// coordinate system). |start| is the logical start and |end| is the logical
// end of selection. Visually, |start| may lie after |end|.
@@ -24,7 +27,8 @@ class UI_BASE_EXPORT TouchEditable : public ui::SimpleMenuModel::Delegate {
virtual void MoveCaretTo(const gfx::Point& point) = 0;
// Gets the end points of the current selection. The end points p1 and p2 must
- // be the cursor rect for the start and end of selection:
+ // be the cursor rect for the start and end of selection (in local
+ // coordinates):
// ____________________________________
// | textfield with |selected text| |
// ------------------------------------
@@ -34,7 +38,7 @@ class UI_BASE_EXPORT TouchEditable : public ui::SimpleMenuModel::Delegate {
// visually, p1 could be to the right of p2 in the figure above.
virtual void GetSelectionEndPoints(gfx::Rect* p1, gfx::Rect* p2) = 0;
- // Gets the bounds of the client view in parent's coordinates.
+ // Gets the bounds of the client view in its local coordinates.
virtual gfx::Rect GetBounds() = 0;
// Gets the NativeView hosting the client.
« no previous file with comments | « content/browser/web_contents/touch_editable_impl_aura.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698