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

Unified Diff: ui/touch_selection/touch_selection_controller.cc

Issue 937773003: Add INSERTION_DRAG_STOPPED to SelectionEventType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and Addressed Reviews 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/touch_selection/touch_selection_controller.cc
diff --git a/ui/touch_selection/touch_selection_controller.cc b/ui/touch_selection/touch_selection_controller.cc
index 3a4ae475ece6b4e548be889761303935bd1fe2fc..9ec5d58b3fd6beb6b1cb8ffc761af1e242ca7306 100644
--- a/ui/touch_selection/touch_selection_controller.cc
+++ b/ui/touch_selection/touch_selection_controller.cc
@@ -61,7 +61,6 @@ TouchSelectionController::TouchSelectionController(
temporarily_hidden_(false),
selection_handle_dragged_(false) {
DCHECK(client_);
- HideAndDisallowShowingAutomatically();
}
TouchSelectionController::~TouchSelectionController() {
@@ -268,7 +267,9 @@ void TouchSelectionController::OnHandleDragUpdate(const TouchHandle& handle,
}
void TouchSelectionController::OnHandleDragEnd(const TouchHandle& handle) {
- if (&handle != insertion_handle_.get())
+ if (&handle == insertion_handle_.get())
+ client_->OnSelectionEvent(INSERTION_DRAG_STOPPED, handle.position());
+ else
client_->OnSelectionEvent(SELECTION_DRAG_STOPPED, handle.position());
}
« no previous file with comments | « ui/touch_selection/selection_event_type.h ('k') | ui/touch_selection/touch_selection_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698