| 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/shell_port_classic.h" | 5 #include "ash/aura/shell_port_classic.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/accelerators/accelerator_controller.h" | 9 #include "ash/accelerators/accelerator_controller.h" |
| 10 #include "ash/accelerators/accelerator_controller_delegate_aura.h" | 10 #include "ash/accelerators/accelerator_controller_delegate_aura.h" |
| 11 #include "ash/aura/key_event_watcher_aura.h" | 11 #include "ash/aura/key_event_watcher_aura.h" |
| 12 #include "ash/aura/pointer_watcher_adapter.h" | 12 #include "ash/aura/pointer_watcher_adapter.h" |
| 13 #include "ash/display/window_tree_host_manager.h" | 13 #include "ash/display/window_tree_host_manager.h" |
| 14 #include "ash/host/ash_window_tree_host.h" | 14 #include "ash/host/ash_window_tree_host.h" |
| 15 #include "ash/host/ash_window_tree_host_init_params.h" | 15 #include "ash/host/ash_window_tree_host_init_params.h" |
| 16 #include "ash/keyboard/keyboard_ui.h" | 16 #include "ash/keyboard/keyboard_ui.h" |
| 17 #include "ash/laser/laser_pointer_controller.h" | 17 #include "ash/laser/laser_pointer_controller.h" |
| 18 #include "ash/magnifier/partial_magnification_controller.h" | 18 #include "ash/magnifier/partial_magnification_controller.h" |
| 19 #include "ash/metrics/task_switch_metrics_recorder.h" | 19 #include "ash/metrics/task_switch_metrics_recorder.h" |
| 20 #include "ash/public/cpp/config.h" | 20 #include "ash/public/cpp/config.h" |
| 21 #include "ash/session/session_state_delegate.h" | |
| 22 #include "ash/shared/immersive_fullscreen_controller.h" | 21 #include "ash/shared/immersive_fullscreen_controller.h" |
| 23 #include "ash/shell.h" | 22 #include "ash/shell.h" |
| 24 #include "ash/shell_delegate.h" | 23 #include "ash/shell_delegate.h" |
| 25 #include "ash/shell_observer.h" | 24 #include "ash/shell_observer.h" |
| 26 #include "ash/touch/touch_uma.h" | 25 #include "ash/touch/touch_uma.h" |
| 27 #include "ash/virtual_keyboard_controller.h" | 26 #include "ash/virtual_keyboard_controller.h" |
| 28 #include "ash/wm/drag_window_resizer.h" | 27 #include "ash/wm/drag_window_resizer.h" |
| 29 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" | 28 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" |
| 30 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard.h" | 29 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard.h" |
| 31 #include "ash/wm/mru_window_tracker.h" | 30 #include "ash/wm/mru_window_tracker.h" |
| 32 #include "ash/wm/overview/window_selector_controller.h" | 31 #include "ash/wm/overview/window_selector_controller.h" |
| 33 #include "ash/wm/window_cycle_event_filter_aura.h" | 32 #include "ash/wm/window_cycle_event_filter_aura.h" |
| 34 #include "ash/wm/window_util.h" | 33 #include "ash/wm/window_util.h" |
| 35 #include "ash/wm/workspace/workspace_event_handler_aura.h" | 34 #include "ash/wm/workspace/workspace_event_handler_aura.h" |
| 36 #include "ash/wm_display_observer.h" | 35 #include "ash/wm_display_observer.h" |
| 37 #include "ash/wm_window.h" | 36 #include "ash/wm_window.h" |
| 38 #include "base/memory/ptr_util.h" | 37 #include "base/memory/ptr_util.h" |
| 39 #include "ui/aura/env.h" | 38 #include "ui/aura/env.h" |
| 40 #include "ui/display/manager/chromeos/default_touch_transform_setter.h" | 39 #include "ui/display/manager/chromeos/default_touch_transform_setter.h" |
| 41 #include "ui/display/manager/display_manager.h" | 40 #include "ui/display/manager/display_manager.h" |
| 42 #include "ui/display/types/native_display_delegate.h" | 41 #include "ui/display/types/native_display_delegate.h" |
| 43 | 42 |
| 44 #if defined(USE_X11) | 43 #if defined(USE_X11) |
| 45 #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" |
| 46 #include "ui/display/manager/chromeos/x11/native_display_delegate_x11.h" | 45 #include "ui/display/manager/chromeos/x11/native_display_delegate_x11.h" |
| 47 #endif | 46 #endif |
| 48 | 47 |
| 49 #if defined(USE_OZONE) | 48 #if defined(USE_OZONE) |
| 50 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.
h" | 49 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.
h" |
| 51 #include "ui/display/types/native_display_delegate.h" | |
| 52 #include "ui/ozone/public/ozone_platform.h" | 50 #include "ui/ozone/public/ozone_platform.h" |
| 53 #endif | 51 #endif |
| 54 | 52 |
| 55 namespace ash { | 53 namespace ash { |
| 56 | 54 |
| 57 ShellPortClassic::ShellPortClassic() {} | 55 ShellPortClassic::ShellPortClassic() {} |
| 58 | 56 |
| 59 ShellPortClassic::~ShellPortClassic() {} | 57 ShellPortClassic::~ShellPortClassic() {} |
| 60 | 58 |
| 61 // static | 59 // static |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 } | 209 } |
| 212 | 210 |
| 213 std::unique_ptr<KeyboardUI> ShellPortClassic::CreateKeyboardUI() { | 211 std::unique_ptr<KeyboardUI> ShellPortClassic::CreateKeyboardUI() { |
| 214 return KeyboardUI::Create(); | 212 return KeyboardUI::Create(); |
| 215 } | 213 } |
| 216 | 214 |
| 217 std::unique_ptr<KeyEventWatcher> ShellPortClassic::CreateKeyEventWatcher() { | 215 std::unique_ptr<KeyEventWatcher> ShellPortClassic::CreateKeyEventWatcher() { |
| 218 return base::MakeUnique<KeyEventWatcherAura>(); | 216 return base::MakeUnique<KeyEventWatcherAura>(); |
| 219 } | 217 } |
| 220 | 218 |
| 221 SessionStateDelegate* ShellPortClassic::GetSessionStateDelegate() { | |
| 222 return Shell::Get()->session_state_delegate(); | |
| 223 } | |
| 224 | |
| 225 void ShellPortClassic::AddDisplayObserver(WmDisplayObserver* observer) { | 219 void ShellPortClassic::AddDisplayObserver(WmDisplayObserver* observer) { |
| 226 if (!added_display_observer_) { | 220 if (!added_display_observer_) { |
| 227 added_display_observer_ = true; | 221 added_display_observer_ = true; |
| 228 Shell::Get()->window_tree_host_manager()->AddObserver(this); | 222 Shell::Get()->window_tree_host_manager()->AddObserver(this); |
| 229 } | 223 } |
| 230 display_observers_.AddObserver(observer); | 224 display_observers_.AddObserver(observer); |
| 231 } | 225 } |
| 232 | 226 |
| 233 void ShellPortClassic::RemoveDisplayObserver(WmDisplayObserver* observer) { | 227 void ShellPortClassic::RemoveDisplayObserver(WmDisplayObserver* observer) { |
| 234 display_observers_.RemoveObserver(observer); | 228 display_observers_.RemoveObserver(observer); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 for (auto& observer : display_observers_) | 299 for (auto& observer : display_observers_) |
| 306 observer.OnDisplayConfigurationChanging(); | 300 observer.OnDisplayConfigurationChanging(); |
| 307 } | 301 } |
| 308 | 302 |
| 309 void ShellPortClassic::OnDisplayConfigurationChanged() { | 303 void ShellPortClassic::OnDisplayConfigurationChanged() { |
| 310 for (auto& observer : display_observers_) | 304 for (auto& observer : display_observers_) |
| 311 observer.OnDisplayConfigurationChanged(); | 305 observer.OnDisplayConfigurationChanged(); |
| 312 } | 306 } |
| 313 | 307 |
| 314 } // namespace ash | 308 } // namespace ash |
| OLD | NEW |