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

Unified Diff: ash/display/screen_orientation_controller_chromeos.cc

Issue 2951773002: Don't lock and save the orientation change made not through ScreenOrientationController (Closed)
Patch Set: removed tests that no longer makes sense Created 3 years, 6 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/display/display_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/screen_orientation_controller_chromeos.cc
diff --git a/ash/display/screen_orientation_controller_chromeos.cc b/ash/display/screen_orientation_controller_chromeos.cc
index 5c43768ff054d83f97c12614170cc68b94fa2ea5..e64e6123de8f4f89de9aacf443305693b544e5aa 100644
--- a/ash/display/screen_orientation_controller_chromeos.cc
+++ b/ash/display/screen_orientation_controller_chromeos.cc
@@ -288,20 +288,17 @@ void ScreenOrientationController::OnDisplayConfigurationChanged() {
return;
if (!display::Display::HasInternalDisplay())
return;
- display::Display::Rotation user_rotation =
+ if (!Shell::Get()->display_manager()->IsActiveDisplayId(
+ display::Display::InternalDisplayId())) {
+ return;
+ }
+
+ // TODO(oshima): We should disable the orientation change in settings
+ // because application may not work correctly.
+ current_rotation_ =
ShellPort::Get()
->GetDisplayInfo(display::Display::InternalDisplayId())
.GetActiveRotation();
- if (user_rotation != current_rotation_) {
- // TODO(oshima): We should disable the orientation change in settings
- // because application may not work correctly.
-
- // A user may change other display configuration settings. When the user
- // does change the rotation setting, then lock rotation to prevent the
- // accelerometer from erasing their change.
- SetRotationLockedInternal(true);
- user_rotation_ = current_rotation_ = user_rotation;
- }
}
void ScreenOrientationController::OnMaximizeModeStarted() {
« no previous file with comments | « ash/display/display_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698