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

Unified Diff: chrome/browser/ui/ash/chrome_shell_delegate_chromeos.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
Index: chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
index 8fdfe73cb06a79dec29a53a80b3ca4e5d4f23218..39a7887846891d479784a8a15b88bbc003408e26 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
#include "chrome/browser/chromeos/accessibility/magnification_manager.h"
#include "chrome/browser/chromeos/background/ash_user_wallpaper_delegate.h"
+#include "chrome/browser/chromeos/display/display_configuration_observer.h"
#include "chrome/browser/chromeos/display/display_preferences.h"
#include "chrome/browser/chromeos/extensions/media_player_api.h"
#include "chrome/browser/chromeos/extensions/media_player_event_router.h"
@@ -207,12 +208,18 @@ bool ChromeShellDelegate::IsFirstRunAfterBoot() const {
void ChromeShellDelegate::PreInit() {
chromeos::LoadDisplayPreferences(IsFirstRunAfterBoot());
+ display_configuration_observer_.reset(
+ new chromeos::DisplayConfigurationObserver());
Jun Mukai 2014/01/13 23:51:15 I'm not sure why moving display_configuration_obse
oshima 2014/01/13 23:58:19 This should happen before Shell::Init so that obse
}
void ChromeShellDelegate::Shutdown() {
content::RecordAction(content::UserMetricsAction("Shutdown"));
chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
RequestShutdown();
+
+ // Let classes unregister themselves as observers of the ash::Shell singleton
+ // before the shell is destroyed.
+ display_configuration_observer_.reset();
}
ash::CapsLockDelegate* ChromeShellDelegate::CreateCapsLockDelegate() {

Powered by Google App Engine
This is Rietveld 408576698