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

Unified Diff: ash/wm/workspace/workspace_event_handler.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/workspace_event_handler.h ('k') | chrome/browser/ui/views/browser_action_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_event_handler.cc
diff --git a/ash/wm/workspace/workspace_event_handler.cc b/ash/wm/workspace/workspace_event_handler.cc
index 75626ffeef3de4c72a8dd7192c8ffe8ecde69d8e..929d09c284146c784213e8cbd17e42e63446629a 100644
--- a/ash/wm/workspace/workspace_event_handler.cc
+++ b/ash/wm/workspace/workspace_event_handler.cc
@@ -106,15 +106,16 @@ ui::EventResult WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
return ToplevelWindowEventHandler::OnMouseEvent(event);
}
-ui::EventResult WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event) {
+void WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event) {
aura::Window* target = static_cast<aura::Window*>(event->target());
if (event->type() == ui::ET_GESTURE_DOUBLE_TAP &&
target->delegate()->GetNonClientComponent(event->location()) ==
HTCAPTION) {
ToggleMaximizedState(target); // |this| may be destroyed from here.
- return ui::ER_CONSUMED;
+ event->StopPropagation();
+ return;
}
- return ToplevelWindowEventHandler::OnGestureEvent(event);
+ ToplevelWindowEventHandler::OnGestureEvent(event);
}
void WorkspaceEventHandler::HandleVerticalResizeDoubleClick(
« no previous file with comments | « ash/wm/workspace/workspace_event_handler.h ('k') | chrome/browser/ui/views/browser_action_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698