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

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

Issue 289583002: Lock rotation when screen is manually rotated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Block saving directly Created 6 years, 7 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_preferences.cc
diff --git a/chrome/browser/chromeos/display/display_preferences.cc b/chrome/browser/chromeos/display/display_preferences.cc
index 25a2356da281844bc83f32edb45890943f17cc67..42df268abef2dc2f6593af7ed5e61091023ca362 100644
--- a/chrome/browser/chromeos/display/display_preferences.cc
+++ b/chrome/browser/chromeos/display/display_preferences.cc
@@ -9,6 +9,7 @@
#include "ash/display/display_pref_util.h"
#include "ash/display/resolution_notification_controller.h"
#include "ash/shell.h"
+#include "ash/wm/maximize_mode/maximize_mode_controller.h"
#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h"
#include "base/prefs/scoped_user_pref_update.h"
@@ -309,6 +310,13 @@ void StoreDisplayPrefs() {
DoesNotificationTimeout()) {
return;
}
+
+ ash::Shell* shell = ash::Shell::GetInstance();
+ if (shell->IsMaximizeModeWindowManagerEnabled() &&
+ shell->maximize_mode_controller()->accelerometer_setting_rotation()) {
+ return;
+ }
oshima 2014/05/22 17:14:29 Can you define a predicate like Shell::ShoudDispl
jonross 2014/05/23 19:07:20 Done.
+
StoreCurrentDisplayLayoutPrefs();
StoreCurrentDisplayProperties();
}

Powered by Google App Engine
This is Rietveld 408576698