OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/aura/shell_port_classic.h" | 5 #include "ash/aura/shell_port_classic.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/accelerators/accelerator_controller.h" | 9 #include "ash/accelerators/accelerator_controller.h" |
10 #include "ash/accelerators/accelerator_controller_delegate_aura.h" | 10 #include "ash/accelerators/accelerator_controller_delegate_aura.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "ash/virtual_keyboard_controller.h" | 26 #include "ash/virtual_keyboard_controller.h" |
27 #include "ash/wm/drag_window_resizer.h" | 27 #include "ash/wm/drag_window_resizer.h" |
28 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" | 28 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" |
29 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard.h" | 29 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard.h" |
30 #include "ash/wm/mru_window_tracker.h" | 30 #include "ash/wm/mru_window_tracker.h" |
31 #include "ash/wm/overview/window_selector_controller.h" | 31 #include "ash/wm/overview/window_selector_controller.h" |
32 #include "ash/wm/window_cycle_event_filter_aura.h" | 32 #include "ash/wm/window_cycle_event_filter_aura.h" |
33 #include "ash/wm/window_util.h" | 33 #include "ash/wm/window_util.h" |
34 #include "ash/wm/workspace/workspace_event_handler_aura.h" | 34 #include "ash/wm/workspace/workspace_event_handler_aura.h" |
35 #include "ash/wm_display_observer.h" | 35 #include "ash/wm_display_observer.h" |
36 #include "ash/wm_window.h" | |
37 #include "base/memory/ptr_util.h" | 36 #include "base/memory/ptr_util.h" |
38 #include "ui/aura/env.h" | 37 #include "ui/aura/env.h" |
39 #include "ui/display/manager/chromeos/default_touch_transform_setter.h" | 38 #include "ui/display/manager/chromeos/default_touch_transform_setter.h" |
40 #include "ui/display/manager/display_manager.h" | 39 #include "ui/display/manager/display_manager.h" |
41 #include "ui/display/types/native_display_delegate.h" | 40 #include "ui/display/types/native_display_delegate.h" |
42 | 41 |
43 #if defined(USE_X11) | 42 #if defined(USE_X11) |
44 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h" | 43 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h" |
45 #include "ui/display/manager/chromeos/x11/native_display_delegate_x11.h" | 44 #include "ui/display/manager/chromeos/x11/native_display_delegate_x11.h" |
46 #endif | 45 #endif |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // This is part of a fat interface that is only implemented on the mash side; | 142 // This is part of a fat interface that is only implemented on the mash side; |
144 // there isn't an equivalent operation in ::wm::CursorManager. We also can't | 143 // there isn't an equivalent operation in ::wm::CursorManager. We also can't |
145 // just call into ShellPortMash because of library linking issues. | 144 // just call into ShellPortMash because of library linking issues. |
146 NOTREACHED(); | 145 NOTREACHED(); |
147 } | 146 } |
148 | 147 |
149 bool ShellPortClassic::IsMouseEventsEnabled() { | 148 bool ShellPortClassic::IsMouseEventsEnabled() { |
150 return Shell::Get()->cursor_manager()->IsMouseEventsEnabled(); | 149 return Shell::Get()->cursor_manager()->IsMouseEventsEnabled(); |
151 } | 150 } |
152 | 151 |
153 std::vector<WmWindow*> ShellPortClassic::GetAllRootWindows() { | 152 std::vector<aura::Window*> ShellPortClassic::GetAllRootWindows() { |
154 aura::Window::Windows root_windows = | 153 return Shell::Get()->window_tree_host_manager()->GetAllRootWindows(); |
155 Shell::Get()->window_tree_host_manager()->GetAllRootWindows(); | |
156 std::vector<WmWindow*> wm_windows(root_windows.size()); | |
157 for (size_t i = 0; i < root_windows.size(); ++i) | |
158 wm_windows[i] = WmWindow::Get(root_windows[i]); | |
159 return wm_windows; | |
160 } | 154 } |
161 | 155 |
162 void ShellPortClassic::RecordUserMetricsAction(UserMetricsAction action) { | 156 void ShellPortClassic::RecordUserMetricsAction(UserMetricsAction action) { |
163 Shell::Get()->metrics()->RecordUserMetricsAction(action); | 157 Shell::Get()->metrics()->RecordUserMetricsAction(action); |
164 } | 158 } |
165 | 159 |
166 void ShellPortClassic::RecordGestureAction(GestureActionType action) { | 160 void ShellPortClassic::RecordGestureAction(GestureActionType action) { |
167 TouchUMA::GetInstance()->RecordGestureAction(action); | 161 TouchUMA::GetInstance()->RecordGestureAction(action); |
168 } | 162 } |
169 | 163 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 for (auto& observer : display_observers_) | 293 for (auto& observer : display_observers_) |
300 observer.OnDisplayConfigurationChanging(); | 294 observer.OnDisplayConfigurationChanging(); |
301 } | 295 } |
302 | 296 |
303 void ShellPortClassic::OnDisplayConfigurationChanged() { | 297 void ShellPortClassic::OnDisplayConfigurationChanged() { |
304 for (auto& observer : display_observers_) | 298 for (auto& observer : display_observers_) |
305 observer.OnDisplayConfigurationChanged(); | 299 observer.OnDisplayConfigurationChanged(); |
306 } | 300 } |
307 | 301 |
308 } // namespace ash | 302 } // namespace ash |
OLD | NEW |