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

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

Issue 22703004: Creates notifications for display resolution change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix on display_preferences_unittest Created 7 years, 4 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/shell.cc ('k') | chrome/browser/chromeos/display/display_preferences_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/display/display_preferences.cc
diff --git a/chrome/browser/chromeos/display/display_preferences.cc b/chrome/browser/chromeos/display/display_preferences.cc
index 168404ce39e35ed7d02732aa6c94771428f4f2c2..14c18ff04657ec8d0561b8e5bc685e32c988bdfe 100644
--- a/chrome/browser/chromeos/display/display_preferences.cc
+++ b/chrome/browser/chromeos/display/display_preferences.cc
@@ -8,6 +8,7 @@
#include "ash/display/display_layout_store.h"
#include "ash/display/display_manager.h"
#include "ash/display/display_pref_util.h"
+#include "ash/display/resolution_notification_controller.h"
#include "ash/shell.h"
#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h"
@@ -258,8 +259,12 @@ void RegisterDisplayLocalStatePrefs(PrefRegistrySimple* registry) {
}
void StoreDisplayPrefs() {
- if (!IsValidUser())
+ // Do not store prefs when the confirmation dialog is shown.
+ if (!IsValidUser() ||
+ ash::Shell::GetInstance()->resolution_notification_controller()->
+ DoesNotificationTimeout()) {
return;
+ }
StoreCurrentDisplayLayoutPrefs();
StoreCurrentDisplayProperties();
StoreCurrentDisplayPowerState();
« no previous file with comments | « ash/shell.cc ('k') | chrome/browser/chromeos/display/display_preferences_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698