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

Unified Diff: ui/views/controls/textfield/textfield.h

Issue 407993003: Fix gesture handling for Views textfields (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests Created 6 years, 5 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 | « chrome/browser/ui/views/omnibox/omnibox_view_views.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/views/controls/textfield/textfield.h
diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h
index f32ec89dbeee1fbf93d69d2925a3cb6585a8d2e8..e06a3326c81c3241b6d12072d66752b72fa5981b 100644
--- a/ui/views/controls/textfield/textfield.h
+++ b/ui/views/controls/textfield/textfield.h
@@ -89,6 +89,9 @@ class VIEWS_EXPORT Textfield : public View,
// of text that overflows its display area.
void SelectAll(bool reversed);
+ // A convenience method to select the word closest to |point|.
+ void SelectWordAt(const gfx::Point& point);
+
// Clears the selection within the edit field and sets the caret to the end.
void ClearSelection();
@@ -450,6 +453,15 @@ class VIEWS_EXPORT Textfield : public View,
scoped_ptr<ui::TouchSelectionController> touch_selection_controller_;
+ // Used to track touch drag starting location and offset to enable touch
+ // scrolling.
+ gfx::Point drag_start_location_;
+ int drag_start_display_offset_;
+
+ // Tracks if touch editing handles are hidden because user has started
+ // scrolling. If |true|, handles are shown after scrolling ends.
+ bool touch_handles_hidden_due_to_scroll_;
+
// Context menu related members.
scoped_ptr<ui::SimpleMenuModel> context_menu_contents_;
scoped_ptr<views::MenuRunner> context_menu_runner_;
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698