From da285851ecc61ed9c3cdb35cd5c4e8f73ce1d6b2 Mon Sep 17 00:00:00 2001 From: "jonross@chromium.org" Date: Tue, 27 May 2014 19:53:43 +0000 Subject: Lock rotation when screen is manually rotated. Lock Rotation when screen is manually rotated. This re-lands: https://codereview.chromium.org/261163004 which was reverted by: https://codereview.chromium.org/271133002 640650531fbd87578ea969b3a7f8d8a9c915bcc4. Additionally DisplayManager now accepts a source of display rotations. Those triggered by explicit user input (display settins, ctrl+shift+f3) will be stored as a part of display settings. Those triggered by rotation will not. Upon exiting maximize mode the display will be returned to the last rotation explicitly set by a user. TEST=MaximizeControllerModeTest TEST=DisplayPreferencesTest BUG=371426 BUG=369505 Review URL: https://codereview.chromium.org/289583002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273011 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/shell.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ash/shell.cc') diff --git a/ash/shell.cc b/ash/shell.cc index c0a1765..b8a69de 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -477,6 +477,14 @@ bool Shell::IsMaximizeModeWindowManagerEnabled() { return maximize_mode_window_manager_.get() != NULL; } +#if defined(OS_CHROMEOS) +bool Shell::ShouldSaveDisplaySettings() { + return !((IsMaximizeModeWindowManagerEnabled() && + maximize_mode_controller_->in_set_screen_rotation()) || + resolution_notification_controller_->DoesNotificationTimeout()); +} +#endif + void Shell::UpdateShelfVisibility() { RootWindowControllerList controllers = GetAllRootWindowControllers(); for (RootWindowControllerList::iterator iter = controllers.begin(); -- cgit v1.1