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

Unified Diff: ash/display/screen_orientation_controller_chromeos.cc

Issue 1594683002: Introduce DisplayConfigurationController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_576375_display1b1
Patch Set: Rebase Created 4 years, 11 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') | ash/display/window_tree_host_manager.h » ('j') | 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 31583563bcbdcc14f481156da7432620212738b7..973f1551ff5ff9ee69c0b96bb641b3e2c12fe5ba 100644
--- a/ash/display/screen_orientation_controller_chromeos.cc
+++ b/ash/display/screen_orientation_controller_chromeos.cc
@@ -5,9 +5,9 @@
#include "ash/display/screen_orientation_controller_chromeos.h"
#include "ash/ash_switches.h"
+#include "ash/display/display_configuration_controller.h"
#include "ash/display/display_info.h"
#include "ash/display/display_manager.h"
-#include "ash/rotator/screen_rotation_animator.h"
#include "ash/shell.h"
#include "ash/wm/maximize_mode/maximize_mode_controller.h"
#include "base/auto_reset.h"
@@ -144,14 +144,9 @@ void ScreenOrientationController::SetDisplayRotation(
base::AutoReset<bool> auto_ignore_display_configuration_updates(
&ignore_display_configuration_updates_, true);
- ash::ScreenRotationAnimator screen_rotation_animator(
- gfx::Display::InternalDisplayId());
- if (screen_rotation_animator.CanAnimate()) {
- screen_rotation_animator.Rotate(rotation, source);
- } else {
- Shell::GetInstance()->display_manager()->SetDisplayRotation(
- gfx::Display::InternalDisplayId(), rotation, source);
- }
+ Shell::GetInstance()->display_configuration_controller()->SetDisplayRotation(
+ gfx::Display::InternalDisplayId(), rotation, source,
+ true /* user_action */);
}
void ScreenOrientationController::OnWindowActivated(
« no previous file with comments | « ash/display/display_manager_unittest.cc ('k') | ash/display/window_tree_host_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698