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

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

Issue 2690263005: mash: Disable calls to suspend and resume displays. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | no next file » | 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 b083405614b1ca32032f74f60a4030c732f9e5d2..a59d96ff08f118f4016ae80dcf7d995953233d15 100644
--- a/ash/system/chromeos/power/power_event_observer.cc
+++ b/ash/system/chromeos/power/power_event_observer.cc
@@ -118,14 +118,22 @@ void PowerEventObserver::SuspendImminent() {
}
ui::UserActivityDetector::Get()->OnDisplayPowerChanging();
- Shell::GetInstance()->display_configurator()->SuspendDisplays(base::Bind(
- &OnSuspendDisplaysCompleted, chromeos::DBusThreadManager::Get()
- ->GetPowerManagerClient()
- ->GetSuspendReadinessCallback()));
+
+ // TODO(derat): After mus exposes a method for suspending displays, call it
+ // here: http://crbug.com/692193
+ if (!WmShell::Get()->IsRunningInMash()) {
+ Shell::GetInstance()->display_configurator()->SuspendDisplays(base::Bind(
+ &OnSuspendDisplaysCompleted, chromeos::DBusThreadManager::Get()
+ ->GetPowerManagerClient()
+ ->GetSuspendReadinessCallback()));
+ }
}
void PowerEventObserver::SuspendDone(const base::TimeDelta& sleep_duration) {
- Shell::GetInstance()->display_configurator()->ResumeDisplays();
+ // TODO(derat): After mus exposes a method for resuming displays, call it
+ // here: http://crbug.com/692193
+ if (!WmShell::Get()->IsRunningInMash())
+ Shell::GetInstance()->display_configurator()->ResumeDisplays();
WmShell::Get()->system_tray_notifier()->NotifyRefreshClock();
// If the suspend request was being blocked while waiting for the lock
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698