Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Side by Side Diff: ash/common/wm_shell.cc

Issue 2497123002: chromeos: Move device shutdown handling out of chrome into ash (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/mus/manifest.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/devtools/ash_devtools_dom_agent.h" 12 #include "ash/common/devtools/ash_devtools_dom_agent.h"
13 #include "ash/common/focus_cycler.h" 13 #include "ash/common/focus_cycler.h"
14 #include "ash/common/keyboard/keyboard_ui.h" 14 #include "ash/common/keyboard/keyboard_ui.h"
15 #include "ash/common/new_window_client_proxy.h" 15 #include "ash/common/new_window_client_proxy.h"
16 #include "ash/common/palette_delegate.h" 16 #include "ash/common/palette_delegate.h"
17 #include "ash/common/session/session_state_delegate.h" 17 #include "ash/common/session/session_state_delegate.h"
18 #include "ash/common/shelf/app_list_shelf_item_delegate.h" 18 #include "ash/common/shelf/app_list_shelf_item_delegate.h"
19 #include "ash/common/shelf/shelf_controller.h" 19 #include "ash/common/shelf/shelf_controller.h"
20 #include "ash/common/shelf/shelf_delegate.h" 20 #include "ash/common/shelf/shelf_delegate.h"
21 #include "ash/common/shelf/shelf_model.h" 21 #include "ash/common/shelf/shelf_model.h"
22 #include "ash/common/shelf/shelf_window_watcher.h" 22 #include "ash/common/shelf/shelf_window_watcher.h"
23 #include "ash/common/shell_delegate.h" 23 #include "ash/common/shell_delegate.h"
24 #include "ash/common/shutdown_controller.h"
24 #include "ash/common/system/brightness_control_delegate.h" 25 #include "ash/common/system/brightness_control_delegate.h"
25 #include "ash/common/system/keyboard_brightness_control_delegate.h" 26 #include "ash/common/system/keyboard_brightness_control_delegate.h"
26 #include "ash/common/system/locale/locale_notification_controller.h" 27 #include "ash/common/system/locale/locale_notification_controller.h"
27 #include "ash/common/system/toast/toast_manager.h" 28 #include "ash/common/system/toast/toast_manager.h"
28 #include "ash/common/system/tray/system_tray_controller.h" 29 #include "ash/common/system/tray/system_tray_controller.h"
29 #include "ash/common/system/tray/system_tray_delegate.h" 30 #include "ash/common/system/tray/system_tray_delegate.h"
30 #include "ash/common/system/tray/system_tray_notifier.h" 31 #include "ash/common/system/tray/system_tray_notifier.h"
31 #include "ash/common/wallpaper/wallpaper_controller.h" 32 #include "ash/common/wallpaper/wallpaper_controller.h"
32 #include "ash/common/wallpaper/wallpaper_delegate.h" 33 #include "ash/common/wallpaper/wallpaper_delegate.h"
33 #include "ash/common/wm/immersive_context_ash.h" 34 #include "ash/common/wm/immersive_context_ash.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 242
242 WmShell::WmShell(std::unique_ptr<ShellDelegate> shell_delegate) 243 WmShell::WmShell(std::unique_ptr<ShellDelegate> shell_delegate)
243 : delegate_(std::move(shell_delegate)), 244 : delegate_(std::move(shell_delegate)),
244 focus_cycler_(base::MakeUnique<FocusCycler>()), 245 focus_cycler_(base::MakeUnique<FocusCycler>()),
245 immersive_context_(base::MakeUnique<ImmersiveContextAsh>()), 246 immersive_context_(base::MakeUnique<ImmersiveContextAsh>()),
246 locale_notification_controller_( 247 locale_notification_controller_(
247 base::MakeUnique<LocaleNotificationController>()), 248 base::MakeUnique<LocaleNotificationController>()),
248 new_window_client_(base::MakeUnique<NewWindowClientProxy>( 249 new_window_client_(base::MakeUnique<NewWindowClientProxy>(
249 delegate_->GetShellConnector())), 250 delegate_->GetShellConnector())),
250 shelf_controller_(base::MakeUnique<ShelfController>()), 251 shelf_controller_(base::MakeUnique<ShelfController>()),
252 shutdown_controller_(base::MakeUnique<ShutdownController>()),
251 system_tray_controller_(base::MakeUnique<SystemTrayController>( 253 system_tray_controller_(base::MakeUnique<SystemTrayController>(
252 delegate_->GetShellConnector())), 254 delegate_->GetShellConnector())),
253 system_tray_notifier_(base::MakeUnique<SystemTrayNotifier>()), 255 system_tray_notifier_(base::MakeUnique<SystemTrayNotifier>()),
254 wallpaper_delegate_(delegate_->CreateWallpaperDelegate()), 256 wallpaper_delegate_(delegate_->CreateWallpaperDelegate()),
255 window_cycle_controller_(base::MakeUnique<WindowCycleController>()), 257 window_cycle_controller_(base::MakeUnique<WindowCycleController>()),
256 window_selector_controller_( 258 window_selector_controller_(
257 base::MakeUnique<WindowSelectorController>()) { 259 base::MakeUnique<WindowSelectorController>()) {
258 #if defined(OS_CHROMEOS) 260 #if defined(OS_CHROMEOS)
259 brightness_control_delegate_.reset(new system::BrightnessControllerChromeos); 261 brightness_control_delegate_.reset(new system::BrightnessControllerChromeos);
260 keyboard_brightness_control_delegate_.reset(new KeyboardBrightnessController); 262 keyboard_brightness_control_delegate_.reset(new KeyboardBrightnessController);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 void WmShell::DeleteToastManager() { 396 void WmShell::DeleteToastManager() {
395 toast_manager_.reset(); 397 toast_manager_.reset();
396 } 398 }
397 399
398 void WmShell::SetAcceleratorController( 400 void WmShell::SetAcceleratorController(
399 std::unique_ptr<AcceleratorController> accelerator_controller) { 401 std::unique_ptr<AcceleratorController> accelerator_controller) {
400 accelerator_controller_ = std::move(accelerator_controller); 402 accelerator_controller_ = std::move(accelerator_controller);
401 } 403 }
402 404
403 } // namespace ash 405 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/mus/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698