| 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/mus/bridge/wm_shell_mus.h" | 5 #include "ash/mus/bridge/wm_shell_mus.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/common/accelerators/accelerator_controller.h" | 9 #include "ash/common/accelerators/accelerator_controller.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/shell_window_ids.h" | 13 #include "ash/common/shell_window_ids.h" |
| 14 #include "ash/common/system/tray/default_system_tray_delegate.h" | 14 #include "ash/common/system/tray/system_tray_delegate.h" |
| 15 #include "ash/common/wallpaper/wallpaper_delegate.h" | 15 #include "ash/common/wallpaper/wallpaper_delegate.h" |
| 16 #include "ash/common/wm/maximize_mode/maximize_mode_event_handler.h" | 16 #include "ash/common/wm/maximize_mode/maximize_mode_event_handler.h" |
| 17 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard
.h" | 17 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard
.h" |
| 18 #include "ash/common/wm/mru_window_tracker.h" | 18 #include "ash/common/wm/mru_window_tracker.h" |
| 19 #include "ash/common/wm/window_cycle_event_filter.h" | 19 #include "ash/common/wm/window_cycle_event_filter.h" |
| 20 #include "ash/common/wm/window_resizer.h" | 20 #include "ash/common/wm/window_resizer.h" |
| 21 #include "ash/common/wm_activation_observer.h" | 21 #include "ash/common/wm_activation_observer.h" |
| 22 #include "ash/mus/accelerators/accelerator_controller_delegate_mus.h" | 22 #include "ash/mus/accelerators/accelerator_controller_delegate_mus.h" |
| 23 #include "ash/mus/accelerators/accelerator_controller_registrar.h" | 23 #include "ash/mus/accelerators/accelerator_controller_registrar.h" |
| 24 #include "ash/mus/bridge/immersive_handler_factory_mus.h" | 24 #include "ash/mus/bridge/immersive_handler_factory_mus.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 window_manager_, accelerator_namespace_id)); | 128 window_manager_, accelerator_namespace_id)); |
| 129 SetAcceleratorController(base::MakeUnique<AcceleratorController>( | 129 SetAcceleratorController(base::MakeUnique<AcceleratorController>( |
| 130 accelerator_controller_delegate_.get(), | 130 accelerator_controller_delegate_.get(), |
| 131 accelerator_controller_registrar_.get())); | 131 accelerator_controller_registrar_.get())); |
| 132 immersive_handler_factory_.reset(new ImmersiveHandlerFactoryMus); | 132 immersive_handler_factory_.reset(new ImmersiveHandlerFactoryMus); |
| 133 | 133 |
| 134 CreateMaximizeModeController(); | 134 CreateMaximizeModeController(); |
| 135 | 135 |
| 136 CreateMruWindowTracker(); | 136 CreateMruWindowTracker(); |
| 137 | 137 |
| 138 SetSystemTrayDelegate(base::MakeUnique<DefaultSystemTrayDelegate>()); | 138 SetSystemTrayDelegate( |
| 139 base::WrapUnique(delegate()->CreateSystemTrayDelegate())); |
| 139 | 140 |
| 140 SetKeyboardUI(KeyboardUIMus::Create(window_manager_->connector())); | 141 SetKeyboardUI(KeyboardUIMus::Create(window_manager_->connector())); |
| 141 | 142 |
| 142 wallpaper_delegate()->InitializeWallpaper(); | 143 wallpaper_delegate()->InitializeWallpaper(); |
| 143 } | 144 } |
| 144 | 145 |
| 145 WmShellMus::~WmShellMus() { | 146 WmShellMus::~WmShellMus() { |
| 146 // This order mirrors that of Shell. | 147 // This order mirrors that of Shell. |
| 147 | 148 |
| 148 // Destroy maximize mode controller early on since it has some observers which | 149 // Destroy maximize mode controller early on since it has some observers which |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 OnWindowActivated(gained_active, lost_active)); | 446 OnWindowActivated(gained_active, lost_active)); |
| 446 } | 447 } |
| 447 | 448 |
| 448 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { | 449 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { |
| 449 DCHECK_EQ(window_tree_client(), client); | 450 DCHECK_EQ(window_tree_client(), client); |
| 450 client->RemoveObserver(this); | 451 client->RemoveObserver(this); |
| 451 } | 452 } |
| 452 | 453 |
| 453 } // namespace mus | 454 } // namespace mus |
| 454 } // namespace ash | 455 } // namespace ash |
| OLD | NEW |