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

Unified Diff: ui/aura/gestures/gesture_recognizer_unittest.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 | « ui/app_list/contents_view.cc ('k') | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 44399dc812760f68498f34ebb0fc7f02c67ec619..8d5752f3d0c9487cf8a367020ec2216d46f00fe7 100644
--- a/ui/aura/gestures/gesture_recognizer_unittest.cc
+++ b/ui/aura/gestures/gesture_recognizer_unittest.cc
@@ -310,12 +310,11 @@ class QueueTouchEventDelegate : public GestureEventConsumeDelegate {
}
virtual ~QueueTouchEventDelegate() {}
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
+ virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
if (queue_events_) {
queue_.push(new ui::TouchEvent(*event, window_, window_));
- return ui::ER_CONSUMED;
+ event->StopPropagation();
}
- return ui::ER_UNHANDLED;
}
void ReceivedAck() {
@@ -2605,10 +2604,11 @@ class ConsumesTouchMovesDelegate : public GestureEventConsumeDelegate {
void set_consume_touch_move(bool consume) { consume_touch_move_ = consume; }
private:
- virtual ui::EventResult OnTouchEvent(ui::TouchEvent* touch) OVERRIDE {
+ virtual void OnTouchEvent(ui::TouchEvent* touch) OVERRIDE {
if (consume_touch_move_ && touch->type() == ui::ET_TOUCH_MOVED)
- return ui::ER_HANDLED;
- return GestureEventConsumeDelegate::OnTouchEvent(touch);
+ touch->SetHandled();
+ else
+ GestureEventConsumeDelegate::OnTouchEvent(touch);
}
bool consume_touch_move_;
« no previous file with comments | « ui/app_list/contents_view.cc ('k') | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698