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

Unified Diff: ash/display/display_change_observer_chromeos.cc

Issue 923273003: Update diplays even if configuration failed during startup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test build Created 5 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 | « ash/display/display_change_observer_chromeos.h ('k') | ash/display/display_configurator_animation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_change_observer_chromeos.cc
diff --git a/ash/display/display_change_observer_chromeos.cc b/ash/display/display_change_observer_chromeos.cc
index de4819495d8bea21bede92f59e485684b5cdb2c2..23d195f736295a64822849f5a38be78791750e2b 100644
--- a/ash/display/display_change_observer_chromeos.cc
+++ b/ash/display/display_change_observer_chromeos.cc
@@ -255,6 +255,16 @@ void DisplayChangeObserver::OnDisplayModeChanged(
user_activity_detector->OnDisplayPowerChanging();
}
+void DisplayChangeObserver::OnDisplayModeChangeFailed(
+ const ui::DisplayConfigurator::DisplayStateList& displays,
+ ui::MultipleDisplayState failed_new_state) {
+ // If display configuration failed during startup, simply update the display
+ // manager with detected displays. If no display is detected, it will
+ // create a pseudo display.
+ if (Shell::GetInstance()->display_manager()->GetNumDisplays() == 0)
+ OnDisplayModeChanged(displays);
+}
+
void DisplayChangeObserver::OnAppTerminating() {
#if defined(USE_ASH)
// Stop handling display configuration events once the shutdown
« no previous file with comments | « ash/display/display_change_observer_chromeos.h ('k') | ash/display/display_configurator_animation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698