| 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/wm_shell_aura.h" | 5 #include "ash/aura/wm_shell_aura.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/accelerators/accelerator_controller_delegate_aura.h" | 9 #include "ash/accelerators/accelerator_controller_delegate_aura.h" |
| 10 #include "ash/aura/key_event_watcher_aura.h" | 10 #include "ash/aura/key_event_watcher_aura.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "ash/shared/immersive_fullscreen_controller.h" | 28 #include "ash/shared/immersive_fullscreen_controller.h" |
| 29 #include "ash/shell.h" | 29 #include "ash/shell.h" |
| 30 #include "ash/touch/touch_uma.h" | 30 #include "ash/touch/touch_uma.h" |
| 31 #include "ash/virtual_keyboard_controller.h" | 31 #include "ash/virtual_keyboard_controller.h" |
| 32 #include "ash/wm/drag_window_resizer.h" | 32 #include "ash/wm/drag_window_resizer.h" |
| 33 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" | 33 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" |
| 34 #include "ash/wm/window_cycle_event_filter_aura.h" | 34 #include "ash/wm/window_cycle_event_filter_aura.h" |
| 35 #include "ash/wm/window_util.h" | 35 #include "ash/wm/window_util.h" |
| 36 #include "ash/wm/workspace/workspace_event_handler_aura.h" | 36 #include "ash/wm/workspace/workspace_event_handler_aura.h" |
| 37 #include "base/memory/ptr_util.h" | 37 #include "base/memory/ptr_util.h" |
| 38 #include "ui/aura/client/capture_client.h" | |
| 39 #include "ui/aura/client/focus_client.h" | |
| 40 #include "ui/aura/env.h" | 38 #include "ui/aura/env.h" |
| 41 #include "ui/display/manager/display_manager.h" | 39 #include "ui/display/manager/display_manager.h" |
| 42 | 40 |
| 43 #if defined(USE_X11) | 41 #if defined(USE_X11) |
| 44 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h" | 42 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h" |
| 45 #endif | 43 #endif |
| 46 | 44 |
| 47 #if defined(USE_OZONE) | 45 #if defined(USE_OZONE) |
| 48 #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" |
| 49 #endif | 47 #endif |
| (...skipping 22 matching lines...) Expand all Loading... |
| 72 } | 70 } |
| 73 | 71 |
| 74 bool WmShellAura::IsRunningInMash() const { | 72 bool WmShellAura::IsRunningInMash() const { |
| 75 return false; | 73 return false; |
| 76 } | 74 } |
| 77 | 75 |
| 78 Config WmShellAura::GetConfig() const { | 76 Config WmShellAura::GetConfig() const { |
| 79 return Config::CLASSIC; | 77 return Config::CLASSIC; |
| 80 } | 78 } |
| 81 | 79 |
| 82 WmWindow* WmShellAura::GetFocusedWindow() { | |
| 83 return WmWindow::Get( | |
| 84 aura::client::GetFocusClient(Shell::GetPrimaryRootWindow()) | |
| 85 ->GetFocusedWindow()); | |
| 86 } | |
| 87 | |
| 88 WmWindow* WmShellAura::GetActiveWindow() { | |
| 89 return WmWindow::Get(wm::GetActiveWindow()); | |
| 90 } | |
| 91 | |
| 92 WmWindow* WmShellAura::GetCaptureWindow() { | |
| 93 // Ash shares capture client among all RootWindowControllers, so we need only | |
| 94 // check the primary root. | |
| 95 return WmWindow::Get( | |
| 96 aura::client::GetCaptureWindow(Shell::GetPrimaryRootWindow())); | |
| 97 } | |
| 98 | |
| 99 WmWindow* WmShellAura::GetPrimaryRootWindow() { | 80 WmWindow* WmShellAura::GetPrimaryRootWindow() { |
| 100 return WmWindow::Get( | 81 return WmWindow::Get( |
| 101 Shell::GetInstance()->window_tree_host_manager()->GetPrimaryRootWindow()); | 82 Shell::GetInstance()->window_tree_host_manager()->GetPrimaryRootWindow()); |
| 102 } | 83 } |
| 103 | 84 |
| 104 WmWindow* WmShellAura::GetRootWindowForDisplayId(int64_t display_id) { | 85 WmWindow* WmShellAura::GetRootWindowForDisplayId(int64_t display_id) { |
| 105 return WmWindow::Get(Shell::GetInstance() | 86 return WmWindow::Get(Shell::GetInstance() |
| 106 ->window_tree_host_manager() | 87 ->window_tree_host_manager() |
| 107 ->GetRootWindowForDisplayId(display_id)); | 88 ->GetRootWindowForDisplayId(display_id)); |
| 108 } | 89 } |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 for (auto& observer : display_observers_) | 271 for (auto& observer : display_observers_) |
| 291 observer.OnDisplayConfigurationChanging(); | 272 observer.OnDisplayConfigurationChanging(); |
| 292 } | 273 } |
| 293 | 274 |
| 294 void WmShellAura::OnDisplayConfigurationChanged() { | 275 void WmShellAura::OnDisplayConfigurationChanged() { |
| 295 for (auto& observer : display_observers_) | 276 for (auto& observer : display_observers_) |
| 296 observer.OnDisplayConfigurationChanged(); | 277 observer.OnDisplayConfigurationChanged(); |
| 297 } | 278 } |
| 298 | 279 |
| 299 } // namespace ash | 280 } // namespace ash |
| OLD | NEW |