| 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/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/laser/laser_pointer_controller.h" |
| 22 #include "ash/metrics/task_switch_metrics_recorder.h" | 22 #include "ash/metrics/task_switch_metrics_recorder.h" |
| 23 #include "ash/shared/immersive_fullscreen_controller.h" | 23 #include "ash/shared/immersive_fullscreen_controller.h" |
| 24 #include "ash/shell.h" | 24 #include "ash/shell.h" |
| 25 #include "ash/touch/touch_uma.h" | 25 #include "ash/touch/touch_uma.h" |
| 26 #include "ash/wm/drag_window_resizer.h" | 26 #include "ash/wm/drag_window_resizer.h" |
| 27 #include "ash/wm/lock_state_controller.h" |
| 27 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" | 28 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" |
| 28 #include "ash/wm/screen_pinning_controller.h" | 29 #include "ash/wm/screen_pinning_controller.h" |
| 29 #include "ash/wm/window_cycle_event_filter_aura.h" | 30 #include "ash/wm/window_cycle_event_filter_aura.h" |
| 30 #include "ash/wm/window_util.h" | 31 #include "ash/wm/window_util.h" |
| 31 #include "ash/wm/workspace/workspace_event_handler_aura.h" | 32 #include "ash/wm/workspace/workspace_event_handler_aura.h" |
| 32 #include "base/memory/ptr_util.h" | 33 #include "base/memory/ptr_util.h" |
| 33 #include "ui/aura/client/capture_client.h" | 34 #include "ui/aura/client/capture_client.h" |
| 34 #include "ui/aura/client/focus_client.h" | 35 #include "ui/aura/client/focus_client.h" |
| 35 #include "ui/aura/env.h" | 36 #include "ui/aura/env.h" |
| 36 #include "ui/display/manager/display_manager.h" | 37 #include "ui/display/manager/display_manager.h" |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 | 276 |
| 276 void WmShellAura::AddPointerWatcher(views::PointerWatcher* watcher, | 277 void WmShellAura::AddPointerWatcher(views::PointerWatcher* watcher, |
| 277 views::PointerWatcherEventTypes events) { | 278 views::PointerWatcherEventTypes events) { |
| 278 pointer_watcher_adapter_->AddPointerWatcher(watcher, events); | 279 pointer_watcher_adapter_->AddPointerWatcher(watcher, events); |
| 279 } | 280 } |
| 280 | 281 |
| 281 void WmShellAura::RemovePointerWatcher(views::PointerWatcher* watcher) { | 282 void WmShellAura::RemovePointerWatcher(views::PointerWatcher* watcher) { |
| 282 pointer_watcher_adapter_->RemovePointerWatcher(watcher); | 283 pointer_watcher_adapter_->RemovePointerWatcher(watcher); |
| 283 } | 284 } |
| 284 | 285 |
| 286 void WmShellAura::RequestShutdown() { |
| 287 Shell::GetInstance()->lock_state_controller()->RequestShutdown(); |
| 288 } |
| 289 |
| 285 bool WmShellAura::IsTouchDown() { | 290 bool WmShellAura::IsTouchDown() { |
| 286 return aura::Env::GetInstance()->is_touch_down(); | 291 return aura::Env::GetInstance()->is_touch_down(); |
| 287 } | 292 } |
| 288 | 293 |
| 289 #if defined(OS_CHROMEOS) | 294 #if defined(OS_CHROMEOS) |
| 290 void WmShellAura::ToggleIgnoreExternalKeyboard() { | 295 void WmShellAura::ToggleIgnoreExternalKeyboard() { |
| 291 Shell::GetInstance() | 296 Shell::GetInstance() |
| 292 ->virtual_keyboard_controller() | 297 ->virtual_keyboard_controller() |
| 293 ->ToggleIgnoreExternalKeyboard(); | 298 ->ToggleIgnoreExternalKeyboard(); |
| 294 } | 299 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 322 for (auto& observer : display_observers_) | 327 for (auto& observer : display_observers_) |
| 323 observer.OnDisplayConfigurationChanging(); | 328 observer.OnDisplayConfigurationChanging(); |
| 324 } | 329 } |
| 325 | 330 |
| 326 void WmShellAura::OnDisplayConfigurationChanged() { | 331 void WmShellAura::OnDisplayConfigurationChanged() { |
| 327 for (auto& observer : display_observers_) | 332 for (auto& observer : display_observers_) |
| 328 observer.OnDisplayConfigurationChanged(); | 333 observer.OnDisplayConfigurationChanged(); |
| 329 } | 334 } |
| 330 | 335 |
| 331 } // namespace ash | 336 } // namespace ash |
| OLD | NEW |