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

Unified Diff: ash/rotator/window_rotation.cc

Issue 975943002: Implemented screen rotation animation experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: ash/rotator/window_rotation.cc
diff --git a/ash/rotator/screen_rotation.cc b/ash/rotator/window_rotation.cc
similarity index 88%
rename from ash/rotator/screen_rotation.cc
rename to ash/rotator/window_rotation.cc
index 385362051313f91697890f3b9ae97ede2f9f7ecb..89a82807b9bc69dfbe4cc09ba50481d0f23f2a4d 100644
--- a/ash/rotator/screen_rotation.cc
+++ b/ash/rotator/window_rotation.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/rotator/screen_rotation.h"
+#include "ash/rotator/window_rotation.h"
#include "base/time/time.h"
#include "ui/compositor/layer.h"
@@ -30,17 +30,17 @@ base::TimeDelta GetTransitionDuration(int degrees) {
} // namespace
-ScreenRotation::ScreenRotation(int degrees, ui::Layer* layer)
+WindowRotation::WindowRotation(int degrees, ui::Layer* layer)
: ui::LayerAnimationElement(LayerAnimationElement::TRANSFORM,
GetTransitionDuration(degrees)),
degrees_(degrees) {
InitTransform(layer);
}
-ScreenRotation::~ScreenRotation() {
+WindowRotation::~WindowRotation() {
}
-void ScreenRotation::InitTransform(ui::Layer* layer) {
+void WindowRotation::InitTransform(ui::Layer* layer) {
// No rotation required, use the identity transform.
if (degrees_ == 0) {
interpolated_transform_.reset(
@@ -104,20 +104,20 @@ void ScreenRotation::InitTransform(ui::Layer* layer) {
interpolated_transform_->SetChild(rotation.release());
}
-void ScreenRotation::OnStart(ui::LayerAnimationDelegate* delegate) {
+void WindowRotation::OnStart(ui::LayerAnimationDelegate* delegate) {
}
-bool ScreenRotation::OnProgress(double t,
+bool WindowRotation::OnProgress(double t,
ui::LayerAnimationDelegate* delegate) {
delegate->SetTransformFromAnimation(interpolated_transform_->Interpolate(t));
return true;
}
-void ScreenRotation::OnGetTarget(TargetValue* target) const {
+void WindowRotation::OnGetTarget(TargetValue* target) const {
target->transform = interpolated_transform_->Interpolate(1.0);
}
-void ScreenRotation::OnAbort(ui::LayerAnimationDelegate* delegate) {
+void WindowRotation::OnAbort(ui::LayerAnimationDelegate* delegate) {
}
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698