| 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/window_state.h" | 10 #include "ash/wm/window_state.h" |
| 11 #include "ash/wm/wm_event.h" | 11 #include "ash/wm/wm_event.h" |
| 12 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
| 13 #include "ui/aura/window_delegate.h" | 13 #include "ui/aura/window_delegate.h" |
| 14 #include "ui/base/hit_test.h" | 14 #include "ui/base/hit_test.h" |
| 15 | 15 |
| 16 namespace ash { | 16 namespace ash { |
| 17 namespace internal { | |
| 18 | 17 |
| 19 WorkspaceEventHandler::WorkspaceEventHandler() { | 18 WorkspaceEventHandler::WorkspaceEventHandler() { |
| 20 } | 19 } |
| 21 | 20 |
| 22 WorkspaceEventHandler::~WorkspaceEventHandler() { | 21 WorkspaceEventHandler::~WorkspaceEventHandler() { |
| 23 } | 22 } |
| 24 | 23 |
| 25 void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) { | 24 void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) { |
| 26 if (event->handled()) | 25 if (event->handled()) |
| 27 return; | 26 return; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 } else if (component == HTLEFT || component == HTRIGHT) { | 101 } else if (component == HTLEFT || component == HTRIGHT) { |
| 103 Shell::GetInstance()->metrics()->RecordUserMetricsAction( | 102 Shell::GetInstance()->metrics()->RecordUserMetricsAction( |
| 104 UMA_TOGGLE_SINGLE_AXIS_MAXIMIZE_BORDER_CLICK); | 103 UMA_TOGGLE_SINGLE_AXIS_MAXIMIZE_BORDER_CLICK); |
| 105 const wm::WMEvent wm_event(wm::WM_EVENT_TOGGLE_HORIZONTAL_MAXIMIZE); | 104 const wm::WMEvent wm_event(wm::WM_EVENT_TOGGLE_HORIZONTAL_MAXIMIZE); |
| 106 target_state->OnWMEvent(&wm_event); | 105 target_state->OnWMEvent(&wm_event); |
| 107 event->StopPropagation(); | 106 event->StopPropagation(); |
| 108 } | 107 } |
| 109 } | 108 } |
| 110 } | 109 } |
| 111 | 110 |
| 112 } // namespace internal | |
| 113 } // namespace ash | 111 } // namespace ash |
| OLD | NEW |