| 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/aura/key_event_watcher_aura.h" | 9 #include "ash/aura/key_event_watcher_aura.h" |
| 10 #include "ash/aura/pointer_watcher_adapter.h" | 10 #include "ash/aura/pointer_watcher_adapter.h" |
| 11 #include "ash/aura/wm_window_aura.h" | 11 #include "ash/aura/wm_window_aura.h" |
| 12 #include "ash/common/session/session_state_delegate.h" | 12 #include "ash/common/session/session_state_delegate.h" |
| 13 #include "ash/common/shell_delegate.h" | 13 #include "ash/common/shell_delegate.h" |
| 14 #include "ash/common/shell_observer.h" | 14 #include "ash/common/shell_observer.h" |
| 15 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard
.h" | 15 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard
.h" |
| 16 #include "ash/common/wm/mru_window_tracker.h" | 16 #include "ash/common/wm/mru_window_tracker.h" |
| 17 #include "ash/common/wm/overview/window_selector_controller.h" | 17 #include "ash/common/wm/overview/window_selector_controller.h" |
| 18 #include "ash/common/wm_activation_observer.h" | 18 #include "ash/common/wm_activation_observer.h" |
| 19 #include "ash/common/wm_display_observer.h" | 19 #include "ash/common/wm_display_observer.h" |
| 20 #include "ash/display/display_manager.h" | |
| 21 #include "ash/display/window_tree_host_manager.h" | 20 #include "ash/display/window_tree_host_manager.h" |
| 22 #include "ash/laser/laser_pointer_controller.h" | 21 #include "ash/laser/laser_pointer_controller.h" |
| 23 #include "ash/metrics/task_switch_metrics_recorder.h" | 22 #include "ash/metrics/task_switch_metrics_recorder.h" |
| 24 #include "ash/shared/immersive_fullscreen_controller.h" | 23 #include "ash/shared/immersive_fullscreen_controller.h" |
| 25 #include "ash/shell.h" | 24 #include "ash/shell.h" |
| 26 #include "ash/touch/touch_uma.h" | 25 #include "ash/touch/touch_uma.h" |
| 27 #include "ash/wm/drag_window_resizer.h" | 26 #include "ash/wm/drag_window_resizer.h" |
| 28 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" | 27 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" |
| 29 #include "ash/wm/screen_pinning_controller.h" | 28 #include "ash/wm/screen_pinning_controller.h" |
| 30 #include "ash/wm/window_cycle_event_filter_aura.h" | 29 #include "ash/wm/window_cycle_event_filter_aura.h" |
| 31 #include "ash/wm/window_util.h" | 30 #include "ash/wm/window_util.h" |
| 32 #include "ash/wm/workspace/workspace_event_handler_aura.h" | 31 #include "ash/wm/workspace/workspace_event_handler_aura.h" |
| 33 #include "base/memory/ptr_util.h" | 32 #include "base/memory/ptr_util.h" |
| 34 #include "ui/aura/client/capture_client.h" | 33 #include "ui/aura/client/capture_client.h" |
| 35 #include "ui/aura/client/focus_client.h" | 34 #include "ui/aura/client/focus_client.h" |
| 36 #include "ui/aura/env.h" | 35 #include "ui/aura/env.h" |
| 36 #include "ui/display/manager/display_manager.h" |
| 37 #include "ui/wm/public/activation_client.h" | 37 #include "ui/wm/public/activation_client.h" |
| 38 | 38 |
| 39 #if defined(OS_CHROMEOS) | 39 #if defined(OS_CHROMEOS) |
| 40 #include "ash/virtual_keyboard_controller.h" | 40 #include "ash/virtual_keyboard_controller.h" |
| 41 #endif | 41 #endif |
| 42 | 42 |
| 43 #if defined(USE_X11) | 43 #if defined(USE_X11) |
| 44 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h" | 44 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h" |
| 45 #endif | 45 #endif |
| 46 | 46 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 ->software_mirroring_display_list()[0]; | 131 ->software_mirroring_display_list()[0]; |
| 132 } | 132 } |
| 133 | 133 |
| 134 bool WmShellAura::IsInUnifiedMode() const { | 134 bool WmShellAura::IsInUnifiedMode() const { |
| 135 return Shell::GetInstance()->display_manager()->IsInUnifiedMode(); | 135 return Shell::GetInstance()->display_manager()->IsInUnifiedMode(); |
| 136 } | 136 } |
| 137 | 137 |
| 138 bool WmShellAura::IsInUnifiedModeIgnoreMirroring() const { | 138 bool WmShellAura::IsInUnifiedModeIgnoreMirroring() const { |
| 139 return Shell::GetInstance() | 139 return Shell::GetInstance() |
| 140 ->display_manager() | 140 ->display_manager() |
| 141 ->current_default_multi_display_mode() == DisplayManager::UNIFIED; | 141 ->current_default_multi_display_mode() == |
| 142 display::DisplayManager::UNIFIED; |
| 142 } | 143 } |
| 143 | 144 |
| 144 bool WmShellAura::IsForceMaximizeOnFirstRun() { | 145 bool WmShellAura::IsForceMaximizeOnFirstRun() { |
| 145 return delegate()->IsForceMaximizeOnFirstRun(); | 146 return delegate()->IsForceMaximizeOnFirstRun(); |
| 146 } | 147 } |
| 147 | 148 |
| 148 void WmShellAura::SetDisplayWorkAreaInsets(WmWindow* window, | 149 void WmShellAura::SetDisplayWorkAreaInsets(WmWindow* window, |
| 149 const gfx::Insets& insets) { | 150 const gfx::Insets& insets) { |
| 150 aura::Window* aura_window = WmWindowAura::GetAuraWindow(window); | 151 aura::Window* aura_window = WmWindowAura::GetAuraWindow(window); |
| 151 Shell::GetInstance()->SetDisplayWorkAreaInsets(aura_window, insets); | 152 Shell::GetInstance()->SetDisplayWorkAreaInsets(aura_window, insets); |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 for (auto& observer : display_observers_) | 326 for (auto& observer : display_observers_) |
| 326 observer.OnDisplayConfigurationChanging(); | 327 observer.OnDisplayConfigurationChanging(); |
| 327 } | 328 } |
| 328 | 329 |
| 329 void WmShellAura::OnDisplayConfigurationChanged() { | 330 void WmShellAura::OnDisplayConfigurationChanged() { |
| 330 for (auto& observer : display_observers_) | 331 for (auto& observer : display_observers_) |
| 331 observer.OnDisplayConfigurationChanged(); | 332 observer.OnDisplayConfigurationChanged(); |
| 332 } | 333 } |
| 333 | 334 |
| 334 } // namespace ash | 335 } // namespace ash |
| OLD | NEW |