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

Unified Diff: ui/touch_selection/longpress_drag_selector.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 | « no previous file | ui/touch_selection/longpress_drag_selector_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/touch_selection/longpress_drag_selector.cc
diff --git a/ui/touch_selection/longpress_drag_selector.cc b/ui/touch_selection/longpress_drag_selector.cc
index b84c90da9e137cc9f5c068ae75941aa8aaededa6..9bf9fbb144afe638309ed63ccaf8364574c91093 100644
--- a/ui/touch_selection/longpress_drag_selector.cc
+++ b/ui/touch_selection/longpress_drag_selector.cc
@@ -53,7 +53,7 @@ bool LongPressDragSelector::WillHandleTouchEvent(const MotionEvent& event) {
gfx::PointF position(event.GetX(), event.GetY());
if (state_ == DRAGGING) {
gfx::PointF drag_position = position + longpress_drag_selection_offset_;
- client_->OnDragUpdate(*this, drag_position);
+ client_->OnDragEvent(HANDLE_DRAG_UPDATE, *this, drag_position);
return true;
}
@@ -102,7 +102,7 @@ bool LongPressDragSelector::WillHandleTouchEvent(const MotionEvent& event) {
gfx::PointF extent = extend_selection_start ? selection_start : selection_end;
longpress_drag_selection_offset_ = extent - position;
- client_->OnDragBegin(*this, extent);
+ client_->OnDragEvent(HANDLE_DRAG_BEGIN, *this, extent);
SetState(DRAGGING);
return true;
}
@@ -145,7 +145,7 @@ void LongPressDragSelector::SetState(SelectionState state) {
// TODO(jdduke): Add UMA for tracking relative longpress drag frequency.
if (was_dragging)
- client_->OnDragEnd(*this);
+ client_->OnDragEvent(HANDLE_DRAG_END, *this, gfx::PointF());
if (was_active != IsActive())
client_->OnLongPressDragActiveStateChanged();
« no previous file with comments | « no previous file | ui/touch_selection/longpress_drag_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698