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

Unified Diff: content/browser/renderer_host/input/stylus_text_selector.h

Issue 2885243003: [Android] Introduce state machine in stylus text selection (Closed)
Patch Set: Fixed the review comments related to naming and other issues. Created 3 years, 7 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 | « no previous file | content/browser/renderer_host/input/stylus_text_selector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/stylus_text_selector.h
diff --git a/content/browser/renderer_host/input/stylus_text_selector.h b/content/browser/renderer_host/input/stylus_text_selector.h
index 05d2f1803822ae3f4dbe27fea06ab87b211e5977..1c1a9d1e0a05c424b314bac6682d8c0edad15615 100644
--- a/content/browser/renderer_host/input/stylus_text_selector.h
+++ b/content/browser/renderer_host/input/stylus_text_selector.h
@@ -50,6 +50,11 @@ class CONTENT_EXPORT StylusTextSelector : public ui::SimpleGestureListener {
bool OnTouchEvent(const ui::MotionEvent& event);
private:
+ enum DragState {
+ NO_DRAG,
+ DRAGGING_WITH_BUTTON_PRESSED,
+ DRAGGING_WITH_BUTTON_RELEASED,
+ };
friend class StylusTextSelectorTest;
FRIEND_TEST_ALL_PREFIXES(StylusTextSelectorTest, ShouldStartTextSelection);
@@ -66,8 +71,7 @@ class CONTENT_EXPORT StylusTextSelector : public ui::SimpleGestureListener {
StylusTextSelectorClient* client_;
bool text_selection_triggered_;
bool secondary_button_pressed_;
- bool dragging_;
- bool dragged_;
+ DragState drag_state_;
float anchor_x_;
float anchor_y_;
std::unique_ptr<ui::GestureDetector> gesture_detector_;
« no previous file with comments | « no previous file | content/browser/renderer_host/input/stylus_text_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698