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

Unified Diff: ash/accelerators/accelerator_controller_delegate_aura.cc

Issue 2720913003: Calls display_configuration_controller to rotate screen in accelerator_controller_delegate_aura (Closed)
Patch Set: Last patch for commit Created 3 years, 10 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 | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller_delegate_aura.cc
diff --git a/ash/accelerators/accelerator_controller_delegate_aura.cc b/ash/accelerators/accelerator_controller_delegate_aura.cc
index 16313bd039f056315c2d3d55a13655e0ca14c757..451ffe05697777222f95b18d7d4787724223c5f3 100644
--- a/ash/accelerators/accelerator_controller_delegate_aura.cc
+++ b/ash/accelerators/accelerator_controller_delegate_aura.cc
@@ -28,7 +28,6 @@
#include "ash/magnifier/magnification_controller.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/root_window_controller.h"
-#include "ash/rotator/screen_rotation_animator.h"
#include "ash/rotator/window_rotation.h"
#include "ash/screenshot_delegate.h"
#include "ash/shell.h"
@@ -160,20 +159,20 @@ void HandleRotateScreen() {
if (Shell::GetInstance()->display_manager()->IsInUnifiedMode())
return;
- base::RecordAction(UserMetricsAction("Accel_Rotate_Window"));
+ base::RecordAction(UserMetricsAction("Accel_Rotate_Screen"));
gfx::Point point = display::Screen::GetScreen()->GetCursorScreenPoint();
display::Display display =
display::Screen::GetScreen()->GetDisplayNearestPoint(point);
const display::ManagedDisplayInfo& display_info =
Shell::GetInstance()->display_manager()->GetDisplayInfo(display.id());
- ScreenRotationAnimator(display.id())
- .Rotate(GetNextRotation(display_info.GetActiveRotation()),
- display::Display::ROTATION_SOURCE_USER);
+ Shell::GetInstance()->display_configuration_controller()->SetDisplayRotation(
+ display.id(), GetNextRotation(display_info.GetActiveRotation()),
+ display::Display::ROTATION_SOURCE_USER);
}
// Rotate the active window.
void HandleRotateActiveWindow() {
- base::RecordAction(UserMetricsAction("Accel_Rotate_Window"));
+ base::RecordAction(UserMetricsAction("Accel_Rotate_Active_Window"));
aura::Window* active_window = wm::GetActiveWindow();
if (active_window) {
// The rotation animation bases its target transform on the current
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698