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

Unified Diff: ash/wm/toplevel_window_event_filter.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 | « ash/wm/toplevel_window_event_filter.h ('k') | ash/wm/user_activity_detector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/toplevel_window_event_filter.cc
diff --git a/ash/wm/toplevel_window_event_filter.cc b/ash/wm/toplevel_window_event_filter.cc
index a83f9a0baa1b189c55c9000c5836e30af1d8fa4a..737fe5f0cab9c4621e6a094c86010a9f79154893 100644
--- a/ash/wm/toplevel_window_event_filter.cc
+++ b/ash/wm/toplevel_window_event_filter.cc
@@ -124,7 +124,7 @@ ui::TouchStatus ToplevelWindowEventFilter::PreHandleTouchEvent(
return ui::TOUCH_STATUS_UNKNOWN;
}
-ui::GestureStatus ToplevelWindowEventFilter::PreHandleGestureEvent(
+ui::EventResult ToplevelWindowEventFilter::PreHandleGestureEvent(
aura::Window* target,
ui::GestureEvent* event) {
switch (event->type()) {
@@ -133,7 +133,7 @@ ui::GestureStatus ToplevelWindowEventFilter::PreHandleGestureEvent(
target->delegate()->GetNonClientComponent(event->location());
if (WindowResizer::GetBoundsChangeForWindowComponent(component) == 0) {
window_resizer_.reset();
- return ui::GESTURE_STATUS_UNKNOWN;
+ return ui::ER_UNHANDLED;
}
in_gesture_resize_ = true;
gfx::Point location_in_parent(
@@ -144,13 +144,13 @@ ui::GestureStatus ToplevelWindowEventFilter::PreHandleGestureEvent(
}
case ui::ET_GESTURE_SCROLL_UPDATE: {
if (!in_gesture_resize_)
- return ui::GESTURE_STATUS_UNKNOWN;
+ return ui::ER_UNHANDLED;
HandleDrag(target, event);
break;
}
case ui::ET_GESTURE_SCROLL_END:
case ui::ET_SCROLL_FLING_START: {
- ui::GestureStatus status = ui::GESTURE_STATUS_UNKNOWN;
+ ui::EventResult status = ui::ER_UNHANDLED;
if (in_gesture_resize_) {
// If the window was being resized, then just complete the resize.
CompleteDrag(DRAG_COMPLETE, event->flags());
@@ -159,7 +159,7 @@ ui::GestureStatus ToplevelWindowEventFilter::PreHandleGestureEvent(
in_move_loop_ = false;
}
in_gesture_resize_ = false;
- status = ui::GESTURE_STATUS_CONSUMED;
+ status = ui::ER_CONSUMED;
}
if (event->type() == ui::ET_GESTURE_SCROLL_END)
@@ -168,9 +168,9 @@ ui::GestureStatus ToplevelWindowEventFilter::PreHandleGestureEvent(
int component =
target->delegate()->GetNonClientComponent(event->location());
if (WindowResizer::GetBoundsChangeForWindowComponent(component) == 0)
- return ui::GESTURE_STATUS_UNKNOWN;
+ return ui::ER_UNHANDLED;
if (!wm::IsWindowNormal(target))
- return ui::GESTURE_STATUS_UNKNOWN;
+ return ui::ER_UNHANDLED;
if (fabs(event->details().velocity_y()) >
kMinVertVelocityForWindowMinimize) {
@@ -196,10 +196,10 @@ ui::GestureStatus ToplevelWindowEventFilter::PreHandleGestureEvent(
break;
}
default:
- return ui::GESTURE_STATUS_UNKNOWN;
+ return ui::ER_UNHANDLED;
}
- return ui::GESTURE_STATUS_CONSUMED;
+ return ui::ER_CONSUMED;
}
void ToplevelWindowEventFilter::RunMoveLoop(aura::Window* source,
« no previous file with comments | « ash/wm/toplevel_window_event_filter.h ('k') | ash/wm/user_activity_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698