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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 975943002: Implemented screen rotation animation experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added ash-screen-rotation-animation entry to histograms.xml. Created 5 years, 9 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/ash.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index 0dd608521ee582d66f265c81bd9025c07e288610..076df1edf83db55e1976cb5c6373218b7609aded 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -24,7 +24,8 @@
#include "ash/multi_profile_uma.h"
#include "ash/new_window_delegate.h"
#include "ash/root_window_controller.h"
-#include "ash/rotator/screen_rotation.h"
+#include "ash/rotator/screen_rotation_animator.h"
+#include "ash/rotator/window_rotation.h"
#include "ash/screenshot_delegate.h"
#include "ash/session/session_state_delegate.h"
#include "ash/shelf/shelf.h"
@@ -293,8 +294,8 @@ void HandleRotateScreen() {
gfx::Display display = Shell::GetScreen()->GetDisplayNearestPoint(point);
const DisplayInfo& display_info =
Shell::GetInstance()->display_manager()->GetDisplayInfo(display.id());
- Shell::GetInstance()->display_manager()->SetDisplayRotation(
- display.id(), GetNextRotation(display_info.rotation()));
+ ash::ScreenRotationAnimator(display.id())
+ .Rotate(GetNextRotation(display_info.rotation()));
}
// Rotate the active window.
@@ -310,7 +311,7 @@ void HandleRotateActiveWindow() {
set_preemption_strategy(ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS);
active_window->layer()->GetAnimator()->StartAnimation(
new ui::LayerAnimationSequence(
- new ash::ScreenRotation(360, active_window->layer())));
+ new ash::WindowRotation(360, active_window->layer())));
}
}
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698