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

Unified Diff: ash/wm/power_button_controller.cc

Issue 2111443002: mash: Migrate SessionStateDelegate access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 6 months 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 side-by-side diff with in-line comments
Download patch
Index: ash/wm/power_button_controller.cc
diff --git a/ash/wm/power_button_controller.cc b/ash/wm/power_button_controller.cc
index 227f52d33ec35d7381bb3fd92e79097a6dca2fbc..69828652d9b1415f93857b7403ca41b04c94feb2 100644
--- a/ash/wm/power_button_controller.cc
+++ b/ash/wm/power_button_controller.cc
@@ -7,6 +7,7 @@
#include "ash/common/ash_switches.h"
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/shell_window_ids.h"
+#include "ash/common/wm_shell.h"
#include "ash/shell.h"
#include "ash/wm/lock_state_controller.h"
#include "ash/wm/maximize_mode/maximize_mode_controller.h"
@@ -71,12 +72,12 @@ void PowerButtonController::OnPowerButtonEvent(
->maximize_mode_controller()
->IsMaximizeModeWindowManagerEnabled()) {
Shell::GetInstance()->accelerator_controller()->PerformActionIfEnabled(
- ash::TAKE_SCREENSHOT);
+ TAKE_SCREENSHOT);
return;
}
const SessionStateDelegate* session_state_delegate =
- Shell::GetInstance()->session_state_delegate();
+ WmShell::Get()->GetSessionStateDelegate();
if (has_legacy_power_button_) {
// If power button releases won't get reported correctly because we're not
// running on official hardware, just lock the screen or shut down
@@ -123,7 +124,7 @@ void PowerButtonController::OnLockButtonEvent(
lock_button_down_ = down;
const SessionStateDelegate* session_state_delegate =
- Shell::GetInstance()->session_state_delegate();
+ WmShell::Get()->GetSessionStateDelegate();
if (!session_state_delegate->CanLockScreen() ||
session_state_delegate->IsScreenLocked() ||
controller_->LockRequested() || controller_->ShutdownRequested()) {

Powered by Google App Engine
This is Rietveld 408576698