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

Unified Diff: ui/display/chromeos/display_configurator.h

Issue 597683004: chromeos: Save display power state on config failure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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: ui/display/chromeos/display_configurator.h
diff --git a/ui/display/chromeos/display_configurator.h b/ui/display/chromeos/display_configurator.h
index c891478a7ee525be59b3ad25da6fbcb7f7a9656f..40a25e2aac9d5a1523200851e92ab50f4975b026 100644
--- a/ui/display/chromeos/display_configurator.h
+++ b/ui/display/chromeos/display_configurator.h
@@ -137,7 +137,9 @@ class DISPLAY_EXPORT DisplayConfigurator : public NativeDisplayObserver {
virtual ~DisplayConfigurator();
MultipleDisplayState display_state() const { return display_state_; }
- chromeos::DisplayPowerState power_state() const { return power_state_; }
+ chromeos::DisplayPowerState requested_power_state() const {
+ return requested_power_state_;
+ }
const gfx::Size framebuffer_size() const { return framebuffer_size_; }
const std::vector<DisplayState>& cached_displays() const {
return cached_displays_;
@@ -320,8 +322,11 @@ class DISPLAY_EXPORT DisplayConfigurator : public NativeDisplayObserver {
gfx::Size framebuffer_size_;
- // The current power state.
- chromeos::DisplayPowerState power_state_;
+ // The last-requested and current power state. These may differ if
+ // configuration fails: SetDisplayMode() needs the last-requested state while
+ // SetDisplayPower() needs the current state.
+ chromeos::DisplayPowerState requested_power_state_;
+ chromeos::DisplayPowerState current_power_state_;
// Most-recently-used display configuration. Note that the actual
// configuration changes asynchronously.

Powered by Google App Engine
This is Rietveld 408576698