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

Unified Diff: ui/aura/root_window.cc

Issue 10912063: events: Get rid of GestureStatus in favour of EventResult. (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
« no previous file with comments | « ui/aura/root_window.h ('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/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index d667f0d0bd992a3784043adbef9777d7eec0a852..7d14d52018dcf55f82c7ed3d59a72b869404c950 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -302,8 +302,8 @@ bool RootWindow::DispatchGestureEvent(ui::GestureEvent* event) {
if (target) {
event->ConvertLocationToTarget(static_cast<Window*>(this), target);
- ui::GestureStatus status = ProcessGestureEvent(target, event);
- return status != ui::GESTURE_STATUS_UNKNOWN;
+ ui::EventResult status = ProcessGestureEvent(target, event);
+ return status != ui::ER_UNHANDLED;
}
return false;
@@ -672,14 +672,12 @@ ui::TouchStatus RootWindow::ProcessTouchEvent(Window* target,
return ui::TOUCH_STATUS_UNKNOWN;
}
-ui::GestureStatus RootWindow::ProcessGestureEvent(Window* target,
- ui::GestureEvent* event) {
+ui::EventResult RootWindow::ProcessGestureEvent(Window* target,
+ ui::GestureEvent* event) {
if (!target)
target = this;
AutoReset<Window*> reset(&event_dispatch_target_, target);
- if (ProcessEvent(target, event) != ui::ER_UNHANDLED)
- return ui::GESTURE_STATUS_CONSUMED;
- return ui::GESTURE_STATUS_UNKNOWN;
+ return static_cast<ui::EventResult>(ProcessEvent(target, event));
}
bool RootWindow::ProcessGestures(ui::GestureRecognizer::Gestures* gestures) {
@@ -688,7 +686,7 @@ bool RootWindow::ProcessGestures(ui::GestureRecognizer::Gestures* gestures) {
bool handled = false;
for (unsigned int i = 0; i < gestures->size(); i++) {
ui::GestureEvent* gesture = gestures->get().at(i);
- if (DispatchGestureEvent(gesture) != ui::GESTURE_STATUS_UNKNOWN)
+ if (DispatchGestureEvent(gesture) != ui::ER_UNHANDLED)
handled = true;
}
return handled;
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698