| 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/wm_window_aura.h" | 9 #include "ash/aura/wm_window_aura.h" |
| 10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
| 11 #include "ash/common/shell_delegate.h" | 11 #include "ash/common/shell_delegate.h" |
| 12 #include "ash/common/shell_observer.h" | 12 #include "ash/common/shell_observer.h" |
| 13 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard
.h" | 13 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard
.h" |
| 14 #include "ash/common/wm/mru_window_tracker.h" | 14 #include "ash/common/wm/mru_window_tracker.h" |
| 15 #include "ash/common/wm/overview/window_selector_controller.h" | 15 #include "ash/common/wm/overview/window_selector_controller.h" |
| 16 #include "ash/common/wm_activation_observer.h" | 16 #include "ash/common/wm_activation_observer.h" |
| 17 #include "ash/common/wm_display_observer.h" | 17 #include "ash/common/wm_display_observer.h" |
| 18 #include "ash/display/display_manager.h" | 18 #include "ash/display/display_manager.h" |
| 19 #include "ash/display/window_tree_host_manager.h" | 19 #include "ash/display/window_tree_host_manager.h" |
| 20 #include "ash/metrics/task_switch_metrics_recorder.h" | 20 #include "ash/metrics/task_switch_metrics_recorder.h" |
| 21 #include "ash/shell.h" | 21 #include "ash/shell.h" |
| 22 #include "ash/wm/drag_window_resizer.h" | 22 #include "ash/wm/drag_window_resizer.h" |
| 23 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" | 23 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" |
| 24 #include "ash/wm/screen_pinning_controller.h" | 24 #include "ash/wm/screen_pinning_controller.h" |
| 25 #include "ash/wm/window_cycle_event_filter_aura.h" | 25 #include "ash/wm/window_cycle_event_filter_aura.h" |
| 26 #include "ash/wm/window_util.h" | 26 #include "ash/wm/window_util.h" |
| 27 #include "base/memory/ptr_util.h" | 27 #include "base/memory/ptr_util.h" |
| 28 #include "ui/aura/client/focus_client.h" | 28 #include "ui/aura/client/focus_client.h" |
| 29 #include "ui/aura/env.h" |
| 29 #include "ui/wm/public/activation_client.h" | 30 #include "ui/wm/public/activation_client.h" |
| 30 | 31 |
| 31 #if defined(OS_CHROMEOS) | 32 #if defined(OS_CHROMEOS) |
| 32 #include "ash/virtual_keyboard_controller.h" | 33 #include "ash/virtual_keyboard_controller.h" |
| 33 #endif | 34 #endif |
| 34 | 35 |
| 35 #if defined(USE_X11) | 36 #if defined(USE_X11) |
| 36 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h" | 37 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h" |
| 37 #endif | 38 #endif |
| 38 | 39 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 } | 208 } |
| 208 | 209 |
| 209 void WmShellAura::AddPointerWatcher(views::PointerWatcher* watcher) { | 210 void WmShellAura::AddPointerWatcher(views::PointerWatcher* watcher) { |
| 210 Shell::GetInstance()->AddPointerWatcher(watcher); | 211 Shell::GetInstance()->AddPointerWatcher(watcher); |
| 211 } | 212 } |
| 212 | 213 |
| 213 void WmShellAura::RemovePointerWatcher(views::PointerWatcher* watcher) { | 214 void WmShellAura::RemovePointerWatcher(views::PointerWatcher* watcher) { |
| 214 Shell::GetInstance()->RemovePointerWatcher(watcher); | 215 Shell::GetInstance()->RemovePointerWatcher(watcher); |
| 215 } | 216 } |
| 216 | 217 |
| 218 bool WmShellAura::IsTouchDown() { |
| 219 return aura::Env::GetInstance()->is_touch_down(); |
| 220 } |
| 221 |
| 217 #if defined(OS_CHROMEOS) | 222 #if defined(OS_CHROMEOS) |
| 218 void WmShellAura::ToggleIgnoreExternalKeyboard() { | 223 void WmShellAura::ToggleIgnoreExternalKeyboard() { |
| 219 Shell::GetInstance() | 224 Shell::GetInstance() |
| 220 ->virtual_keyboard_controller() | 225 ->virtual_keyboard_controller() |
| 221 ->ToggleIgnoreExternalKeyboard(); | 226 ->ToggleIgnoreExternalKeyboard(); |
| 222 } | 227 } |
| 223 #endif | 228 #endif |
| 224 | 229 |
| 225 void WmShellAura::OnWindowActivated( | 230 void WmShellAura::OnWindowActivated( |
| 226 aura::client::ActivationChangeObserver::ActivationReason reason, | 231 aura::client::ActivationChangeObserver::ActivationReason reason, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 246 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, | 251 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, |
| 247 OnDisplayConfigurationChanging()); | 252 OnDisplayConfigurationChanging()); |
| 248 } | 253 } |
| 249 | 254 |
| 250 void WmShellAura::OnDisplayConfigurationChanged() { | 255 void WmShellAura::OnDisplayConfigurationChanged() { |
| 251 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, | 256 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, |
| 252 OnDisplayConfigurationChanged()); | 257 OnDisplayConfigurationChanged()); |
| 253 } | 258 } |
| 254 | 259 |
| 255 } // namespace ash | 260 } // namespace ash |
| OLD | NEW |