| 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/pointer_watcher_adapter.h" | 9 #include "ash/aura/pointer_watcher_adapter.h" |
| 10 #include "ash/aura/wm_window_aura.h" | 10 #include "ash/aura/wm_window_aura.h" |
| 11 #include "ash/common/session/session_state_delegate.h" | 11 #include "ash/common/session/session_state_delegate.h" |
| 12 #include "ash/common/shell_delegate.h" | 12 #include "ash/common/shell_delegate.h" |
| 13 #include "ash/common/shell_observer.h" | 13 #include "ash/common/shell_observer.h" |
| 14 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard
.h" | 14 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard
.h" |
| 15 #include "ash/common/wm/mru_window_tracker.h" | 15 #include "ash/common/wm/mru_window_tracker.h" |
| 16 #include "ash/common/wm/overview/window_selector_controller.h" | 16 #include "ash/common/wm/overview/window_selector_controller.h" |
| 17 #include "ash/common/wm_activation_observer.h" | 17 #include "ash/common/wm_activation_observer.h" |
| 18 #include "ash/common/wm_display_observer.h" | 18 #include "ash/common/wm_display_observer.h" |
| 19 #include "ash/display/display_manager.h" | 19 #include "ash/display/display_manager.h" |
| 20 #include "ash/display/window_tree_host_manager.h" | 20 #include "ash/display/window_tree_host_manager.h" |
| 21 #include "ash/laser/laser_pointer_controller.h" |
| 21 #include "ash/metrics/task_switch_metrics_recorder.h" | 22 #include "ash/metrics/task_switch_metrics_recorder.h" |
| 22 #include "ash/shared/immersive_fullscreen_controller.h" | 23 #include "ash/shared/immersive_fullscreen_controller.h" |
| 23 #include "ash/shell.h" | 24 #include "ash/shell.h" |
| 24 #include "ash/touch/touch_uma.h" | 25 #include "ash/touch/touch_uma.h" |
| 25 #include "ash/wm/drag_window_resizer.h" | 26 #include "ash/wm/drag_window_resizer.h" |
| 26 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" | 27 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" |
| 27 #include "ash/wm/screen_pinning_controller.h" | 28 #include "ash/wm/screen_pinning_controller.h" |
| 28 #include "ash/wm/window_cycle_event_filter_aura.h" | 29 #include "ash/wm/window_cycle_event_filter_aura.h" |
| 29 #include "ash/wm/window_util.h" | 30 #include "ash/wm/window_util.h" |
| 30 #include "ash/wm/workspace/workspace_event_handler_aura.h" | 31 #include "ash/wm/workspace/workspace_event_handler_aura.h" |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 bool WmShellAura::IsTouchDown() { | 277 bool WmShellAura::IsTouchDown() { |
| 277 return aura::Env::GetInstance()->is_touch_down(); | 278 return aura::Env::GetInstance()->is_touch_down(); |
| 278 } | 279 } |
| 279 | 280 |
| 280 #if defined(OS_CHROMEOS) | 281 #if defined(OS_CHROMEOS) |
| 281 void WmShellAura::ToggleIgnoreExternalKeyboard() { | 282 void WmShellAura::ToggleIgnoreExternalKeyboard() { |
| 282 Shell::GetInstance() | 283 Shell::GetInstance() |
| 283 ->virtual_keyboard_controller() | 284 ->virtual_keyboard_controller() |
| 284 ->ToggleIgnoreExternalKeyboard(); | 285 ->ToggleIgnoreExternalKeyboard(); |
| 285 } | 286 } |
| 287 |
| 288 void WmShellAura::SetLaserPointerEnabled(bool enabled) { |
| 289 Shell::GetInstance()->laser_pointer_controller()->SetEnabled(enabled); |
| 290 } |
| 286 #endif | 291 #endif |
| 287 | 292 |
| 288 void WmShellAura::OnWindowActivated( | 293 void WmShellAura::OnWindowActivated( |
| 289 aura::client::ActivationChangeObserver::ActivationReason reason, | 294 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 290 aura::Window* gained_active, | 295 aura::Window* gained_active, |
| 291 aura::Window* lost_active) { | 296 aura::Window* lost_active) { |
| 292 WmWindow* gained_active_wm = WmWindowAura::Get(gained_active); | 297 WmWindow* gained_active_wm = WmWindowAura::Get(gained_active); |
| 293 WmWindow* lost_active_wm = WmWindowAura::Get(lost_active); | 298 WmWindow* lost_active_wm = WmWindowAura::Get(lost_active); |
| 294 if (gained_active_wm) | 299 if (gained_active_wm) |
| 295 set_root_window_for_new_windows(gained_active_wm->GetRootWindow()); | 300 set_root_window_for_new_windows(gained_active_wm->GetRootWindow()); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 309 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, | 314 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, |
| 310 OnDisplayConfigurationChanging()); | 315 OnDisplayConfigurationChanging()); |
| 311 } | 316 } |
| 312 | 317 |
| 313 void WmShellAura::OnDisplayConfigurationChanged() { | 318 void WmShellAura::OnDisplayConfigurationChanged() { |
| 314 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, | 319 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, |
| 315 OnDisplayConfigurationChanged()); | 320 OnDisplayConfigurationChanged()); |
| 316 } | 321 } |
| 317 | 322 |
| 318 } // namespace ash | 323 } // namespace ash |
| OLD | NEW |