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

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

Issue 2734933004: ash: Use SessionController instead of SessionStateDelegate (Closed)
Patch Set: rebase to get WorkspaceLayoutManagerSoloTest change 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
« no previous file with comments | « ash/shell_unittest.cc ('k') | ash/system/chromeos/power/power_event_observer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/power/power_event_observer.cc
diff --git a/ash/system/chromeos/power/power_event_observer.cc b/ash/system/chromeos/power/power_event_observer.cc
index a59d96ff08f118f4016ae80dcf7d995953233d15..3441bc16cb48610e62f1d598d13832f95932f921 100644
--- a/ash/system/chromeos/power/power_event_observer.cc
+++ b/ash/system/chromeos/power/power_event_observer.cc
@@ -4,7 +4,7 @@
#include "ash/system/chromeos/power/power_event_observer.h"
-#include "ash/common/session/session_state_delegate.h"
+#include "ash/common/session/session_controller.h"
#include "ash/common/system/tray/system_tray_notifier.h"
#include "ash/common/wm_shell.h"
#include "ash/shell.h"
@@ -76,7 +76,7 @@ void PowerEventObserver::BrightnessChanged(int level, bool user_initiated) {
}
void PowerEventObserver::SuspendImminent() {
- SessionStateDelegate* delegate = WmShell::Get()->GetSessionStateDelegate();
+ SessionController* controller = WmShell::Get()->session_controller();
// This class is responsible for disabling all rendering requests at suspend
// time and then enabling them at resume time. When the
@@ -91,8 +91,8 @@ void PowerEventObserver::SuspendImminent() {
// process starts rendering again. To deal with this, the suspend is delayed
// until all the lock screen animations have completed and the suspend request
// is unblocked from OnLockAnimationsComplete().
- if (!screen_locked_ && delegate->ShouldLockScreenAutomatically() &&
- delegate->CanLockScreen()) {
+ if (!screen_locked_ && controller->ShouldLockScreenAutomatically() &&
+ controller->CanLockScreen()) {
screen_lock_callback_ = chromeos::DBusThreadManager::Get()
->GetPowerManagerClient()
->GetSuspendReadinessCallback();
« no previous file with comments | « ash/shell_unittest.cc ('k') | ash/system/chromeos/power/power_event_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698