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/common/wm_shell.h" | 5 #include "ash/common/wm_shell.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/accelerators/ash_focus_manager_factory.h" | 10 #include "ash/common/accelerators/ash_focus_manager_factory.h" |
11 #include "ash/common/accessibility_delegate.h" | 11 #include "ash/common/accessibility_delegate.h" |
12 #include "ash/common/focus_cycler.h" | 12 #include "ash/common/focus_cycler.h" |
13 #include "ash/common/keyboard/keyboard_ui.h" | 13 #include "ash/common/keyboard/keyboard_ui.h" |
14 #include "ash/common/new_window_delegate.h" | 14 #include "ash/common/new_window_delegate.h" |
15 #include "ash/common/palette_delegate.h" | 15 #include "ash/common/palette_delegate.h" |
16 #include "ash/common/session/session_state_delegate.h" | 16 #include "ash/common/session/session_state_delegate.h" |
17 #include "ash/common/shelf/app_list_shelf_item_delegate.h" | 17 #include "ash/common/shelf/app_list_shelf_item_delegate.h" |
18 #include "ash/common/shelf/shelf_delegate.h" | 18 #include "ash/common/shelf/shelf_delegate.h" |
19 #include "ash/common/shelf/shelf_model.h" | 19 #include "ash/common/shelf/shelf_model.h" |
20 #include "ash/common/shelf/shelf_window_watcher.h" | 20 #include "ash/common/shelf/shelf_window_watcher.h" |
21 #include "ash/common/shell_delegate.h" | 21 #include "ash/common/shell_delegate.h" |
22 #include "ash/common/shell_window_ids.h" | 22 #include "ash/common/shell_window_ids.h" |
23 #include "ash/common/system/brightness_control_delegate.h" | 23 #include "ash/common/system/brightness_control_delegate.h" |
24 #include "ash/common/system/keyboard_brightness_control_delegate.h" | 24 #include "ash/common/system/keyboard_brightness_control_delegate.h" |
25 #include "ash/common/system/toast/toast_manager.h" | 25 #include "ash/common/system/toast/toast_manager.h" |
26 #include "ash/common/system/tray/system_tray_delegate.h" | 26 #include "ash/common/system/tray/system_tray_delegate.h" |
27 #include "ash/common/system/tray/system_tray_notifier.h" | 27 #include "ash/common/system/tray/system_tray_notifier.h" |
| 28 #include "ash/common/wm/immersive_context_ash.h" |
28 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" | 29 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" |
29 #include "ash/common/wm/mru_window_tracker.h" | 30 #include "ash/common/wm/mru_window_tracker.h" |
30 #include "ash/common/wm/overview/window_selector_controller.h" | 31 #include "ash/common/wm/overview/window_selector_controller.h" |
31 #include "ash/common/wm/window_cycle_controller.h" | 32 #include "ash/common/wm/window_cycle_controller.h" |
32 #include "ash/common/wm_window.h" | 33 #include "ash/common/wm_window.h" |
33 #include "base/bind.h" | 34 #include "base/bind.h" |
34 #include "base/logging.h" | 35 #include "base/logging.h" |
| 36 #include "base/memory/ptr_util.h" |
35 #include "ui/app_list/presenter/app_list_presenter.h" | 37 #include "ui/app_list/presenter/app_list_presenter.h" |
36 #include "ui/display/display.h" | 38 #include "ui/display/display.h" |
37 #include "ui/views/focus/focus_manager_factory.h" | 39 #include "ui/views/focus/focus_manager_factory.h" |
38 | 40 |
39 #if defined(OS_CHROMEOS) | 41 #if defined(OS_CHROMEOS) |
40 #include "ash/common/system/chromeos/brightness/brightness_controller_chromeos.h
" | 42 #include "ash/common/system/chromeos/brightness/brightness_controller_chromeos.h
" |
41 #include "ash/common/system/chromeos/keyboard_brightness_controller.h" | 43 #include "ash/common/system/chromeos/keyboard_brightness_controller.h" |
42 #include "ash/common/system/chromeos/session/logout_confirmation_controller.h" | 44 #include "ash/common/system/chromeos/session/logout_confirmation_controller.h" |
43 #endif | 45 #endif |
44 | 46 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 } | 166 } |
165 | 167 |
166 void WmShell::SetShelfDelegateForTesting( | 168 void WmShell::SetShelfDelegateForTesting( |
167 std::unique_ptr<ShelfDelegate> test_delegate) { | 169 std::unique_ptr<ShelfDelegate> test_delegate) { |
168 shelf_delegate_ = std::move(test_delegate); | 170 shelf_delegate_ = std::move(test_delegate); |
169 } | 171 } |
170 | 172 |
171 WmShell::WmShell(std::unique_ptr<ShellDelegate> shell_delegate) | 173 WmShell::WmShell(std::unique_ptr<ShellDelegate> shell_delegate) |
172 : delegate_(std::move(shell_delegate)), | 174 : delegate_(std::move(shell_delegate)), |
173 focus_cycler_(new FocusCycler), | 175 focus_cycler_(new FocusCycler), |
| 176 immersive_context_(base::MakeUnique<ImmersiveContextAsh>()), |
174 shelf_model_(new ShelfModel), // Must create before ShelfDelegate. | 177 shelf_model_(new ShelfModel), // Must create before ShelfDelegate. |
175 system_tray_notifier_(new SystemTrayNotifier), | 178 system_tray_notifier_(new SystemTrayNotifier), |
176 window_cycle_controller_(new WindowCycleController), | 179 window_cycle_controller_(new WindowCycleController), |
177 window_selector_controller_(new WindowSelectorController) { | 180 window_selector_controller_(new WindowSelectorController) { |
178 #if defined(OS_CHROMEOS) | 181 #if defined(OS_CHROMEOS) |
179 brightness_control_delegate_.reset(new system::BrightnessControllerChromeos); | 182 brightness_control_delegate_.reset(new system::BrightnessControllerChromeos); |
180 keyboard_brightness_control_delegate_.reset(new KeyboardBrightnessController); | 183 keyboard_brightness_control_delegate_.reset(new KeyboardBrightnessController); |
181 #endif | 184 #endif |
182 } | 185 } |
183 | 186 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 void WmShell::DeleteToastManager() { | 291 void WmShell::DeleteToastManager() { |
289 toast_manager_.reset(); | 292 toast_manager_.reset(); |
290 } | 293 } |
291 | 294 |
292 void WmShell::SetAcceleratorController( | 295 void WmShell::SetAcceleratorController( |
293 std::unique_ptr<AcceleratorController> accelerator_controller) { | 296 std::unique_ptr<AcceleratorController> accelerator_controller) { |
294 accelerator_controller_ = std::move(accelerator_controller); | 297 accelerator_controller_ = std::move(accelerator_controller); |
295 } | 298 } |
296 | 299 |
297 } // namespace ash | 300 } // namespace ash |
OLD | NEW |