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

Unified Diff: ash/drag_drop/drag_drop_controller.cc

Issue 11568006: events: Update scroll and touch handlers to not return EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self-nit Created 8 years 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 | « ash/drag_drop/drag_drop_controller.h ('k') | ash/launcher/launcher_tooltip_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/drag_drop/drag_drop_controller.cc
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc
index 4248099d6794de4468f72f09fdc068cbee81db34..f3d034393c1db7c65bfaf47209effaa78a57fcd1 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) {
« no previous file with comments | « ash/drag_drop/drag_drop_controller.h ('k') | ash/launcher/launcher_tooltip_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698