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

Unified Diff: chrome/browser/chromeos/display/display_configuration_observer.cc

Issue 12438016: Save display preference when all display configuration changes has been completed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: replace dcheck Created 7 years, 9 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/chromeos/display/display_configuration_observer.cc
diff --git a/chrome/browser/chromeos/display/display_configuration_observer.cc b/chrome/browser/chromeos/display/display_configuration_observer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f9a2bdcd7c23c01a75da9e040c13ad19e4898dd7
--- /dev/null
+++ b/chrome/browser/chromeos/display/display_configuration_observer.cc
@@ -0,0 +1,28 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/display/display_configuration_observer.h"
+
+#include "ash/display/display_controller.h"
+#include "ash/shell.h"
+#include "chrome/browser/chromeos/display/display_preferences.h"
+
+namespace chromeos {
+
+DisplayConfigurationObserver::DisplayConfigurationObserver() {
+ ash::Shell::GetInstance()->display_controller()->AddObserver(this);
+}
+
+DisplayConfigurationObserver::~DisplayConfigurationObserver() {
+ ash::Shell::GetInstance()->display_controller()->RemoveObserver(this);
+}
+
+void DisplayConfigurationObserver::OnDisplayConfigurationChanging() {
+}
+
+void DisplayConfigurationObserver::OnDisplayConfigurationChanged() {
+ StoreDisplayPrefs();
+}
+
+} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698