summaryrefslogtreecommitdiffstats
path: root/ash/drag_drop/drag_drop_controller.cc
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-14 16:18:08 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-14 16:18:08 +0000
commit6f34b4836f777a3c325ded3256b313c030fc3568 (patch)
treeeae5bf57b0b2fe311894d5da221fc254882d57b9 /ash/drag_drop/drag_drop_controller.cc
parent4d1e595f9c36f20be4aa2fee6e15a95c650a72a9 (diff)
downloadchromium_src-6f34b4836f777a3c325ded3256b313c030fc3568.zip
chromium_src-6f34b4836f777a3c325ded3256b313c030fc3568.tar.gz
chromium_src-6f34b4836f777a3c325ded3256b313c030fc3568.tar.bz2
events: Update scroll and touch handlers to not return EventResult.
BUG=163618 Review URL: https://codereview.chromium.org/11568006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173166 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/drag_drop/drag_drop_controller.cc')
-rw-r--r--ash/drag_drop/drag_drop_controller.cc19
1 files changed, 8 insertions, 11 deletions
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc
index 4248099..f3d0343 100644
--- a/ash/drag_drop/drag_drop_controller.cc
+++ b/ash/drag_drop/drag_drop_controller.cc
@@ -325,23 +325,20 @@ ui::EventResult DragDropController::OnMouseEvent(ui::MouseEvent* event) {
return ui::ER_CONSUMED;
}
-ui::EventResult DragDropController::OnTouchEvent(ui::TouchEvent* event) {
+void DragDropController::OnTouchEvent(ui::TouchEvent* event) {
if (!IsDragDropInProgress())
- return ui::ER_UNHANDLED;
+ return;
// If current drag session was not started by touch, dont process this touch
// event, but consume it so it does not interfere with current drag session.
if (current_drag_event_source_ != ui::DragDropTypes::DRAG_EVENT_SOURCE_TOUCH)
- return ui::ER_CONSUMED;
+ event->StopPropagation();
- switch (event->type()) {
- case ui::ET_TOUCH_CANCELLED:
- DragCancel();
- break;
- default:
- break;
- }
- return ui::ER_UNHANDLED;
+ if (event->handled())
+ return;
+
+ if (event->type() == ui::ET_TOUCH_CANCELLED)
+ DragCancel();
}
void DragDropController::OnGestureEvent(ui::GestureEvent* event) {