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

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

Issue 114643003: Use a single ToplevelWindowEventHandler for the ash::Shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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') | ash/wm/workspace/workspace_event_handler_unittest.cc » ('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 bcd7e9e1d642bc6a238e7217bf8d47cd080108b3..c23c7742e106958c17eee1c90a8f48ed01832f9d 100644
--- a/ash/wm/workspace/workspace_event_handler.cc
+++ b/ash/wm/workspace/workspace_event_handler.cc
@@ -54,8 +54,7 @@ void ToggleMaximizedState(wm::WindowState* window_state) {
namespace internal {
-WorkspaceEventHandler::WorkspaceEventHandler(aura::Window* owner)
- : ToplevelWindowEventHandler(owner) {
+WorkspaceEventHandler::WorkspaceEventHandler() {
}
WorkspaceEventHandler::~WorkspaceEventHandler() {
@@ -79,10 +78,8 @@ void 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)) {
- ToplevelWindowEventHandler::OnMouseEvent(event);
+ if (ui::EventCanceledDefaultHandling(*event))
return;
- }
wm::WindowState* target_state = wm::GetWindowState(target);
if (event->flags() & ui::EF_IS_DOUBLE_CLICK &&
event->IsOnlyLeftMouseButton() &&
@@ -91,6 +88,7 @@ void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction(
ash::UMA_TOGGLE_MAXIMIZE_CAPTION_CLICK);
ToggleMaximizedState(target_state);
+ event->StopPropagation();
}
multi_window_resize_controller_.Hide();
HandleVerticalResizeDoubleClick(target_state, event);
@@ -99,7 +97,6 @@ void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
default:
break;
}
- ToplevelWindowEventHandler::OnMouseEvent(event);
}
void WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event) {
@@ -123,7 +120,6 @@ void WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event) {
TouchUMA::GESTURE_FRAMEVIEW_TAP);
}
}
- ToplevelWindowEventHandler::OnGestureEvent(event);
}
void WorkspaceEventHandler::HandleVerticalResizeDoubleClick(
@@ -154,6 +150,7 @@ void WorkspaceEventHandler::HandleVerticalResizeDoubleClick(
target->bounds().width(),
work_area.height()));
}
+ event->StopPropagation();
} else if (component == HTLEFT || component == HTRIGHT) {
// Don't maximize horizontally if the window has a max width defined.
if (max_size.width() != 0)
@@ -172,6 +169,7 @@ void WorkspaceEventHandler::HandleVerticalResizeDoubleClick(
work_area.width(),
target->bounds().height()));
}
+ event->StopPropagation();
}
}
}
« no previous file with comments | « ash/wm/workspace/workspace_event_handler.h ('k') | ash/wm/workspace/workspace_event_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698