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

Unified Diff: ash/display/display_controller.cc

Issue 137193004: Save display preference on boot (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | chrome/browser/chromeos/chrome_browser_main_chromeos.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_controller.cc
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
index a6cff54326ad0bfd0f1eff137cdc9c23c71d525e..343db545c3bf9309594d42698053b6103d7d48e9 100644
--- a/ash/display/display_controller.cc
+++ b/ash/display/display_controller.cc
@@ -19,6 +19,7 @@
#include "ash/root_window_settings.h"
#include "ash/screen_ash.h"
#include "ash/shell.h"
+#include "ash/shell_delegate.h"
#include "ash/wm/coordinate_conversion.h"
#include "base/command_line.h"
#include "base/strings/stringprintf.h"
@@ -246,6 +247,12 @@ DisplayController::~DisplayController() {
void DisplayController::Start() {
Shell::GetScreen()->AddObserver(this);
Shell::GetInstance()->display_manager()->set_delegate(this);
+
+ if (Shell::GetInstance()->delegate()->IsFirstRunAfterBoot()) {
+ // Update the display pref with the initial power state.
+ FOR_EACH_OBSERVER(Observer, observers_, OnDisplayConfigurationChanging());
+ FOR_EACH_OBSERVER(Observer, observers_, OnDisplayConfigurationChanged());
+ }
}
void DisplayController::Shutdown() {
« no previous file with comments | « no previous file | chrome/browser/chromeos/chrome_browser_main_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698