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

Unified Diff: ash/wm/workspace/frame_maximize_button.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 | « ash/wm/workspace/frame_maximize_button.h ('k') | ash/wm/workspace/workspace_event_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/frame_maximize_button.cc
diff --git a/ash/wm/workspace/frame_maximize_button.cc b/ash/wm/workspace/frame_maximize_button.cc
index 2d2a57a547397fec69a8c07697a72c446f8fbea3..a1c8ca917ed4c172b0e107924ad6b9f72dac0a46 100644
--- a/ash/wm/workspace/frame_maximize_button.cc
+++ b/ash/wm/workspace/frame_maximize_button.cc
@@ -245,11 +245,12 @@ void FrameMaximizeButton::OnMouseCaptureLost() {
ImageButton::OnMouseCaptureLost();
}
-ui::EventResult FrameMaximizeButton::OnGestureEvent(ui::GestureEvent* event) {
+void FrameMaximizeButton::OnGestureEvent(ui::GestureEvent* event) {
if (event->type() == ui::ET_GESTURE_TAP_DOWN) {
is_snap_enabled_ = true;
ProcessStartEvent(*event);
- return ui::ER_CONSUMED;
+ event->SetHandled();
+ return;
}
if (event->type() == ui::ET_GESTURE_TAP ||
@@ -261,7 +262,8 @@ ui::EventResult FrameMaximizeButton::OnGestureEvent(ui::GestureEvent* event) {
if (event->type() == ui::ET_GESTURE_TAP)
snap_type_ = SnapTypeForLocation(event->location());
ProcessEndEvent(*event);
- return ui::ER_CONSUMED;
+ event->SetHandled();
+ return;
}
if (is_snap_enabled_) {
@@ -272,17 +274,19 @@ ui::EventResult FrameMaximizeButton::OnGestureEvent(ui::GestureEvent* event) {
ProcessUpdateEvent(*event);
snap_type_ = SnapTypeForLocation(event->location());
ProcessEndEvent(*event);
- return ui::ER_CONSUMED;
+ event->SetHandled();
+ return;
}
if (event->type() == ui::ET_GESTURE_SCROLL_UPDATE ||
event->type() == ui::ET_GESTURE_SCROLL_BEGIN) {
ProcessUpdateEvent(*event);
- return ui::ER_CONSUMED;
+ event->SetHandled();
+ return;
}
}
- return ImageButton::OnGestureEvent(event);
+ ImageButton::OnGestureEvent(event);
}
void FrameMaximizeButton::ProcessStartEvent(const ui::LocatedEvent& event) {
« no previous file with comments | « ash/wm/workspace/frame_maximize_button.h ('k') | ash/wm/workspace/workspace_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698