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

Unified Diff: ash/system/chromeos/power/power_event_observer.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/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 84e27e49032e9ea5924721af78d24681a4357587..1adfb03baf2e05537abc1ad831d02c0482e4fdc8 100644
--- a/ash/system/chromeos/power/power_event_observer.cc
+++ b/ash/system/chromeos/power/power_event_observer.cc
@@ -77,8 +77,7 @@ void PowerEventObserver::BrightnessChanged(int level, bool user_initiated) {
}
void PowerEventObserver::SuspendImminent() {
- Shell* shell = Shell::GetInstance();
- SessionStateDelegate* delegate = shell->session_state_delegate();
+ SessionStateDelegate* delegate = WmShell::Get()->GetSessionStateDelegate();
// This class is responsible for disabling all rendering requests at suspend
// time and then enabling them at resume time. When the
@@ -120,7 +119,7 @@ void PowerEventObserver::SuspendImminent() {
}
ui::UserActivityDetector::Get()->OnDisplayPowerChanging();
- shell->display_configurator()->SuspendDisplays(base::Bind(
+ Shell::GetInstance()->display_configurator()->SuspendDisplays(base::Bind(
&OnSuspendDisplaysCompleted, chromeos::DBusThreadManager::Get()
->GetPowerManagerClient()
->GetSuspendReadinessCallback()));

Powered by Google App Engine
This is Rietveld 408576698