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

Unified Diff: ui/touch_selection/touch_handle.cc

Issue 1424683002: Refactor TouchSelectionDraggableClient APIs Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « ui/touch_selection/longpress_drag_selector_unittest.cc ('k') | ui/touch_selection/touch_handle_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/touch_selection/touch_handle.cc
diff --git a/ui/touch_selection/touch_handle.cc b/ui/touch_selection/touch_handle.cc
index 0fe3612eab31714ea616529d42ad28eb635c944d..a65ba49a665d6d681fbc313353a831759125261f 100644
--- a/ui/touch_selection/touch_handle.cc
+++ b/ui/touch_selection/touch_handle.cc
@@ -195,7 +195,8 @@ bool TouchHandle::WillHandleTouchEvent(const MotionEvent& event) {
// Note that we signal drag update even if we're inside the tap region,
// as there are cases where characters are narrower than the slop length.
- client_->OnDragUpdate(*this, touch_move_position + touch_drag_offset_);
+ client_->OnDragEvent(HANDLE_DRAG_UPDATE, *this,
+ touch_move_position + touch_drag_offset_);
} break;
case MotionEvent::ACTION_UP: {
@@ -337,7 +338,7 @@ void TouchHandle::BeginDrag() {
EndFade();
is_dragging_ = true;
is_drag_within_tap_region_ = true;
- client_->OnDragBegin(*this, focus_bottom());
+ client_->OnDragEvent(HANDLE_DRAG_BEGIN, *this, focus_bottom());
}
void TouchHandle::EndDrag() {
@@ -347,7 +348,7 @@ void TouchHandle::EndDrag() {
is_dragging_ = false;
is_drag_within_tap_region_ = false;
- client_->OnDragEnd(*this);
+ client_->OnDragEvent(HANDLE_DRAG_BEGIN, *this, focus_bottom());
if (deferred_orientation_ != TouchHandleOrientation::UNDEFINED) {
TouchHandleOrientation deferred_orientation = deferred_orientation_;
« no previous file with comments | « ui/touch_selection/longpress_drag_selector_unittest.cc ('k') | ui/touch_selection/touch_handle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698