Index: ui/display/chromeos/display_configurator.cc |
diff --git a/ui/display/chromeos/display_configurator.cc b/ui/display/chromeos/display_configurator.cc |
index 0c7295451dc9b95c5069290ef6e33bd2a7f26130..151b8f1f331c617e3a5fb0b4f2ea2e2f174c9564 100644 |
--- a/ui/display/chromeos/display_configurator.cc |
+++ b/ui/display/chromeos/display_configurator.cc |
@@ -854,7 +854,8 @@ void DisplayConfigurator::RemoveObserver(Observer* observer) { |
observers_.RemoveObserver(observer); |
} |
-void DisplayConfigurator::SuspendDisplays() { |
+void DisplayConfigurator::SuspendDisplays( |
+ const ConfigurationCallback& callback) { |
// If the display is off due to user inactivity and there's only a single |
// internal display connected, switch to the all-on state before |
// suspending. This shouldn't be very noticeable to the user since the |
@@ -862,13 +863,14 @@ void DisplayConfigurator::SuspendDisplays() { |
// into the "on" state, which greatly reduces resume times. |
if (requested_power_state_ == chromeos::DISPLAY_POWER_ALL_OFF) { |
SetDisplayPower(chromeos::DISPLAY_POWER_ALL_ON, |
- kSetDisplayPowerOnlyIfSingleInternalDisplay, |
- base::Bind(&DoNothing)); |
+ kSetDisplayPowerOnlyIfSingleInternalDisplay, callback); |
// We need to make sure that the monitor configuration we just did actually |
// completes before we return, because otherwise the X message could be |
// racing with the HandleSuspendReadiness message. |
native_display_delegate_->SyncWithServer(); |
+ } else { |
+ callback.Run(true); |
} |
displays_suspended_ = true; |