| OLD | NEW |
| 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 "ash/metrics/user_metrics_recorder.h" | 7 #include "ash/metrics/user_metrics_recorder.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/touch/touch_uma.h" | 9 #include "ash/touch/touch_uma.h" |
| 10 #include "ash/wm/aura/wm_window_aura.h" |
| 10 #include "ash/wm/common/window_state.h" | 11 #include "ash/wm/common/window_state.h" |
| 11 #include "ash/wm/common/wm_event.h" | 12 #include "ash/wm/common/wm_event.h" |
| 12 #include "ash/wm/common/wm_window.h" | 13 #include "ash/wm/common/wm_window.h" |
| 13 #include "ash/wm/window_state_aura.h" | 14 #include "ash/wm/window_state_aura.h" |
| 14 #include "ui/aura/window.h" | 15 #include "ui/aura/window.h" |
| 15 #include "ui/aura/window_delegate.h" | 16 #include "ui/aura/window_delegate.h" |
| 16 #include "ui/base/hit_test.h" | 17 #include "ui/base/hit_test.h" |
| 17 | 18 |
| 18 namespace ash { | 19 namespace ash { |
| 19 | 20 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 34 GetNonClientComponent(event->location()); | 35 GetNonClientComponent(event->location()); |
| 35 } | 36 } |
| 36 | 37 |
| 37 if (event->handled()) | 38 if (event->handled()) |
| 38 return; | 39 return; |
| 39 | 40 |
| 40 switch (event->type()) { | 41 switch (event->type()) { |
| 41 case ui::ET_MOUSE_MOVED: { | 42 case ui::ET_MOUSE_MOVED: { |
| 42 int component = | 43 int component = |
| 43 target->delegate()->GetNonClientComponent(event->location()); | 44 target->delegate()->GetNonClientComponent(event->location()); |
| 44 multi_window_resize_controller_.Show(target, component, | 45 multi_window_resize_controller_.Show(wm::WmWindowAura::Get(target), |
| 45 event->location()); | 46 component, event->location()); |
| 46 break; | 47 break; |
| 47 } | 48 } |
| 48 case ui::ET_MOUSE_ENTERED: | 49 case ui::ET_MOUSE_ENTERED: |
| 49 break; | 50 break; |
| 50 case ui::ET_MOUSE_CAPTURE_CHANGED: | 51 case ui::ET_MOUSE_CAPTURE_CHANGED: |
| 51 case ui::ET_MOUSE_EXITED: | 52 case ui::ET_MOUSE_EXITED: |
| 52 break; | 53 break; |
| 53 case ui::ET_MOUSE_PRESSED: { | 54 case ui::ET_MOUSE_PRESSED: { |
| 54 wm::WindowState* target_state = wm::GetWindowState(target); | 55 wm::WindowState* target_state = wm::GetWindowState(target); |
| 55 | 56 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 Shell::GetInstance()->metrics()->RecordUserMetricsAction( | 126 Shell::GetInstance()->metrics()->RecordUserMetricsAction( |
| 126 UMA_TOGGLE_SINGLE_AXIS_MAXIMIZE_BORDER_CLICK); | 127 UMA_TOGGLE_SINGLE_AXIS_MAXIMIZE_BORDER_CLICK); |
| 127 const wm::WMEvent wm_event(wm::WM_EVENT_TOGGLE_HORIZONTAL_MAXIMIZE); | 128 const wm::WMEvent wm_event(wm::WM_EVENT_TOGGLE_HORIZONTAL_MAXIMIZE); |
| 128 target_state->OnWMEvent(&wm_event); | 129 target_state->OnWMEvent(&wm_event); |
| 129 event->StopPropagation(); | 130 event->StopPropagation(); |
| 130 } | 131 } |
| 131 } | 132 } |
| 132 } | 133 } |
| 133 | 134 |
| 134 } // namespace ash | 135 } // namespace ash |
| OLD | NEW |