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

Unified Diff: ui/aura/gestures/gesture_recognizer_unittest.cc

Issue 10964051: events: Clean up dispatching code for touch-events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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/aura/gestures/gesture_recognizer_unittest.cc
diff --git a/ui/aura/gestures/gesture_recognizer_unittest.cc b/ui/aura/gestures/gesture_recognizer_unittest.cc
index 17e33c9b7ac19f3df65cfd9e5781dc0a6d6ad362..ed72c178af9b04857416f278bd30656dcfbfac64 100644
--- a/ui/aura/gestures/gesture_recognizer_unittest.cc
+++ b/ui/aura/gestures/gesture_recognizer_unittest.cc
@@ -287,11 +287,10 @@ class QueueTouchEventDelegate : public GestureEventConsumeDelegate {
}
virtual ~QueueTouchEventDelegate() {}
- virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
+ virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
if (!queue_events_)
- return ui::TOUCH_STATUS_UNKNOWN;
- return event->type() == ui::ET_TOUCH_RELEASED ?
- ui::TOUCH_STATUS_QUEUED_END : ui::TOUCH_STATUS_QUEUED;
+ return ui::ER_UNHANDLED;
+ return ui::ER_ASYNC;
Ben Goodger (Google) 2012/09/26 19:42:48 you can use a ternary here, it should fit on one l
sadrul 2012/09/26 21:26:05 Done.
}
void ReceivedAck() {
@@ -2556,9 +2555,9 @@ class ConsumesTouchMovesDelegate : public GestureEventConsumeDelegate {
void set_consume_touch_move(bool consume) { consume_touch_move_ = consume; }
private:
- virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* touch) OVERRIDE {
+ virtual ui::EventResult OnTouchEvent(ui::TouchEvent* touch) OVERRIDE {
if (consume_touch_move_ && touch->type() == ui::ET_TOUCH_MOVED)
- return ui::TOUCH_STATUS_CONTINUE;
+ return ui::ER_HANDLED;
return GestureEventConsumeDelegate::OnTouchEvent(touch);
}

Powered by Google App Engine
This is Rietveld 408576698