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/mus/bridge/shell_port_mash.h" | 5 #include "ash/mus/bridge/shell_port_mash.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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" | 44 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" |
45 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard.h" | 45 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard.h" |
46 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.
h" | 46 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.
h" |
47 #include "ash/wm/mru_window_tracker.h" | 47 #include "ash/wm/mru_window_tracker.h" |
48 #include "ash/wm/window_cycle_event_filter.h" | 48 #include "ash/wm/window_cycle_event_filter.h" |
49 #include "ash/wm/window_cycle_event_filter_aura.h" | 49 #include "ash/wm/window_cycle_event_filter_aura.h" |
50 #include "ash/wm/window_resizer.h" | 50 #include "ash/wm/window_resizer.h" |
51 #include "ash/wm/window_util.h" | 51 #include "ash/wm/window_util.h" |
52 #include "ash/wm/workspace/workspace_event_handler_aura.h" | 52 #include "ash/wm/workspace/workspace_event_handler_aura.h" |
53 #include "ash/wm_display_observer.h" | 53 #include "ash/wm_display_observer.h" |
54 #include "ash/wm_window.h" | |
55 #include "base/command_line.h" | 54 #include "base/command_line.h" |
56 #include "base/memory/ptr_util.h" | 55 #include "base/memory/ptr_util.h" |
57 #include "components/user_manager/user_info_impl.h" | 56 #include "components/user_manager/user_info_impl.h" |
58 #include "services/ui/public/interfaces/constants.mojom.h" | 57 #include "services/ui/public/interfaces/constants.mojom.h" |
59 #include "ui/aura/env.h" | 58 #include "ui/aura/env.h" |
60 #include "ui/aura/mus/focus_synchronizer.h" | 59 #include "ui/aura/mus/focus_synchronizer.h" |
61 #include "ui/aura/mus/window_tree_client.h" | 60 #include "ui/aura/mus/window_tree_client.h" |
62 #include "ui/aura/mus/window_tree_host_mus.h" | 61 #include "ui/aura/mus/window_tree_host_mus.h" |
63 #include "ui/aura/mus/window_tree_host_mus_init_params.h" | 62 #include "ui/aura/mus/window_tree_host_mus_init_params.h" |
64 #include "ui/aura/window.h" | 63 #include "ui/aura/window.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 window_manager_->window_manager_client()->SetGlobalOverrideCursor( | 263 window_manager_->window_manager_client()->SetGlobalOverrideCursor( |
265 std::move(cursor)); | 264 std::move(cursor)); |
266 } | 265 } |
267 | 266 |
268 bool ShellPortMash::IsMouseEventsEnabled() { | 267 bool ShellPortMash::IsMouseEventsEnabled() { |
269 // TODO: http://crbug.com/637853 | 268 // TODO: http://crbug.com/637853 |
270 NOTIMPLEMENTED(); | 269 NOTIMPLEMENTED(); |
271 return true; | 270 return true; |
272 } | 271 } |
273 | 272 |
274 std::vector<WmWindow*> ShellPortMash::GetAllRootWindows() { | 273 std::vector<aura::Window*> ShellPortMash::GetAllRootWindows() { |
275 if (GetAshConfig() == Config::MUS) { | 274 if (GetAshConfig() == Config::MUS) |
276 aura::Window::Windows root_windows = | 275 return Shell::Get()->window_tree_host_manager()->GetAllRootWindows(); |
277 Shell::Get()->window_tree_host_manager()->GetAllRootWindows(); | 276 |
278 std::vector<WmWindow*> wm_windows(root_windows.size()); | 277 aura::Window::Windows root_windows; |
279 for (size_t i = 0; i < root_windows.size(); ++i) | |
280 wm_windows[i] = WmWindow::Get(root_windows[i]); | |
281 return wm_windows; | |
282 } | |
283 std::vector<WmWindow*> root_windows; | |
284 for (RootWindowController* root_window_controller : | 278 for (RootWindowController* root_window_controller : |
285 RootWindowController::root_window_controllers()) { | 279 RootWindowController::root_window_controllers()) { |
286 root_windows.push_back(root_window_controller->GetWindow()); | 280 root_windows.push_back(root_window_controller->GetRootWindow()); |
287 } | 281 } |
288 return root_windows; | 282 return root_windows; |
289 } | 283 } |
290 | 284 |
291 void ShellPortMash::RecordGestureAction(GestureActionType action) { | 285 void ShellPortMash::RecordGestureAction(GestureActionType action) { |
292 if (GetAshConfig() == Config::MUS) { | 286 if (GetAshConfig() == Config::MUS) { |
293 TouchUMA::GetInstance()->RecordGestureAction(action); | 287 TouchUMA::GetInstance()->RecordGestureAction(action); |
294 return; | 288 return; |
295 } | 289 } |
296 // TODO: http://crbug.com/616581. | 290 // TODO: http://crbug.com/616581. |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 observer.OnDisplayConfigurationChanging(); | 591 observer.OnDisplayConfigurationChanging(); |
598 } | 592 } |
599 | 593 |
600 void ShellPortMash::OnDisplayConfigurationChanged() { | 594 void ShellPortMash::OnDisplayConfigurationChanged() { |
601 for (auto& observer : display_observers_) | 595 for (auto& observer : display_observers_) |
602 observer.OnDisplayConfigurationChanged(); | 596 observer.OnDisplayConfigurationChanged(); |
603 } | 597 } |
604 | 598 |
605 } // namespace mus | 599 } // namespace mus |
606 } // namespace ash | 600 } // namespace ash |
OLD | NEW |