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

Side by Side Diff: ash/wm/workspace/workspace_event_handler.cc

Issue 753933003: Dismiss the multi window resizer when the user clicks outside of the resizer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@toplevel_consume_press
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/workspace/workspace_event_handler.h" 5 #include "ash/wm/workspace/workspace_event_handler.h"
6 6
7 #include "ui/aura/window.h" 7 #include "ui/aura/window.h"
8 #include "ui/aura/window_delegate.h" 8 #include "ui/aura/window_delegate.h"
9 9
10 namespace ash { 10 namespace ash {
11 11
12 WorkspaceEventHandler::WorkspaceEventHandler() { 12 WorkspaceEventHandler::WorkspaceEventHandler() {
13 } 13 }
14 14
15 WorkspaceEventHandler::~WorkspaceEventHandler() { 15 WorkspaceEventHandler::~WorkspaceEventHandler() {
16 } 16 }
17 17
18 void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) { 18 void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
19 if (event->handled()) 19 if (event->handled())
20 return; 20 return;
21 21
22 if (event->type() == ui::ET_MOUSE_MOVED) { 22 if (event->type() == ui::ET_MOUSE_MOVED) {
23 aura::Window* target = static_cast<aura::Window*>(event->target()); 23 aura::Window* target = static_cast<aura::Window*>(event->target());
24 int component = 24 int component =
25 target->delegate()->GetNonClientComponent(event->location()); 25 target->delegate()->GetNonClientComponent(event->location());
26 multi_window_resize_controller_.Show(target, component, event->location()); 26 multi_window_resize_controller_.Show(target, component, event->location());
27 } else if (event->type() == ui::ET_MOUSE_PRESSED) {
28 // The multi window resizer does not hide as a result of a single click
29 // because this code is never reached as a result of a single click.
30 // TODO(pkotwicz): Fix this. http://crbug.com/437125
31 multi_window_resize_controller_.Hide();
32 } 27 }
33 } 28 }
34 29
35 } // namespace ash 30 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698