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

Unified Diff: ash/system/chromeos/power/tablet_power_button_controller.cc

Issue 2734933004: ash: Use SessionController instead of SessionStateDelegate (Closed)
Patch Set: rebase Created 3 years, 9 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/system/chromeos/power/tablet_power_button_controller.cc
diff --git a/ash/system/chromeos/power/tablet_power_button_controller.cc b/ash/system/chromeos/power/tablet_power_button_controller.cc
index 9020e8af9168128b55ce4010f4d8def8dec78768..56569a52ba4ca438358877f371e0b6d33f359db1 100644
--- a/ash/system/chromeos/power/tablet_power_button_controller.cc
+++ b/ash/system/chromeos/power/tablet_power_button_controller.cc
@@ -5,7 +5,7 @@
#include "ash/system/chromeos/power/tablet_power_button_controller.h"
#include "ash/common/accessibility_delegate.h"
-#include "ash/common/session/session_state_delegate.h"
+#include "ash/common/session/session_controller.h"
#include "ash/common/shell_delegate.h"
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/common/wm_shell.h"
@@ -252,13 +252,12 @@ void TabletPowerButtonController::OnShutdownTimeout() {
}
void TabletPowerButtonController::LockScreenIfRequired() {
- SessionStateDelegate* session_state_delegate =
- WmShell::Get()->GetSessionStateDelegate();
- if (session_state_delegate->ShouldLockScreenAutomatically() &&
- session_state_delegate->CanLockScreen() &&
- !session_state_delegate->IsUserSessionBlocked() &&
+ SessionController* session_controller = WmShell::Get()->session_controller();
+ if (session_controller->ShouldLockScreenAutomatically() &&
+ session_controller->CanLockScreen() &&
+ !session_controller->IsUserSessionBlocked() &&
!controller_->LockRequested()) {
- session_state_delegate->LockScreen();
+ session_controller->LockScreen();
}
}

Powered by Google App Engine
This is Rietveld 408576698