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

Unified Diff: ash/wm/workspace/workspace_event_handler.cc

Issue 11592011: events: Update mouse-event handlers to not return EventResult. (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/immersive_mode_controller.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 929d09c284146c784213e8cbd17e42e63446629a..5e1a8a6a6f8914915fc610e4c37ee1db5b66ba7e 100644
--- a/ash/wm/workspace/workspace_event_handler.cc
+++ b/ash/wm/workspace/workspace_event_handler.cc
@@ -65,7 +65,7 @@ WorkspaceEventHandler::~WorkspaceEventHandler() {
*destroyed_ = true;
}
-ui::EventResult WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
+void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
aura::Window* target = static_cast<aura::Window*>(event->target());
switch (event->type()) {
case ui::ET_MOUSE_MOVED: {
@@ -83,8 +83,10 @@ ui::EventResult WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
case ui::ET_MOUSE_PRESSED: {
// Maximize behavior is implemented as post-target handling so the target
// can cancel it.
- if (ui::EventCanceledDefaultHandling(*event))
- return ToplevelWindowEventHandler::OnMouseEvent(event);
+ if (ui::EventCanceledDefaultHandling(*event)) {
+ ToplevelWindowEventHandler::OnMouseEvent(event);
+ return;
+ }
if (event->flags() & ui::EF_IS_DOUBLE_CLICK &&
target->delegate()->GetNonClientComponent(event->location()) ==
@@ -93,7 +95,7 @@ ui::EventResult WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
destroyed_ = &destroyed;
ToggleMaximizedState(target);
if (destroyed)
- return ui::ER_UNHANDLED;
+ return;
destroyed_ = NULL;
}
multi_window_resize_controller_.Hide();
@@ -103,7 +105,7 @@ ui::EventResult WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
default:
break;
}
- return ToplevelWindowEventHandler::OnMouseEvent(event);
+ ToplevelWindowEventHandler::OnMouseEvent(event);
}
void WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event) {
« no previous file with comments | « ash/wm/workspace/workspace_event_handler.h ('k') | chrome/browser/ui/views/immersive_mode_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698