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

Unified Diff: ui/aura/root_window_unittest.cc

Issue 11280290: events: Change gesture-event handler in EventHandler to not return any values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/aura/test/test_event_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window_unittest.cc
diff --git a/ui/aura/root_window_unittest.cc b/ui/aura/root_window_unittest.cc
index 7de3bf3ad53b7fb7be898abb4905b121c1e2dd49..98d3eb1ebcddbd678b3101794aaa12ebf731851b 100644
--- a/ui/aura/root_window_unittest.cc
+++ b/ui/aura/root_window_unittest.cc
@@ -459,9 +459,8 @@ class EventFilterRecorder : public ui::EventHandler {
return ui::ER_UNHANDLED;
}
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
events_.push_back(event->type());
- return ui::ER_UNHANDLED;
}
private:
@@ -746,16 +745,17 @@ class DetachesParentOnTapDelegate : public test::TestWindowDelegate {
virtual ~DetachesParentOnTapDelegate() {}
private:
- virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
- if (event->type() == ui::ET_GESTURE_TAP_DOWN)
- return ui::ER_HANDLED;
+ virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
+ if (event->type() == ui::ET_GESTURE_TAP_DOWN) {
+ event->SetHandled();
+ return;
+ }
if (event->type() == ui::ET_GESTURE_TAP) {
Window* parent = static_cast<Window*>(event->target())->parent();
parent->parent()->RemoveChild(parent);
- return ui::ER_HANDLED;
+ event->SetHandled();
}
- return ui::ER_UNHANDLED;
}
DISALLOW_COPY_AND_ASSIGN(DetachesParentOnTapDelegate);
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/aura/test/test_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698