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

Unified Diff: ash/wm/session_state_animator.cc

Issue 11087093: Migrate ui::Transform to gfx::Transform (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Should pass trybots this time Created 8 years, 2 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/wm/image_grid.cc ('k') | ash/wm/window_animations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/session_state_animator.cc
diff --git a/ash/wm/session_state_animator.cc b/ash/wm/session_state_animator.cc
index 41a19961e075147a89b85dd7e44bb6fba7aa1e5b..180a034d5c18bcb4a02185a297e34e4a142562ba 100644
--- a/ash/wm/session_state_animator.cc
+++ b/ash/wm/session_state_animator.cc
@@ -38,9 +38,9 @@ const float kSlowCloseSizeRatio = 0.95f;
// Returns the transform that should be applied to containers for the slow-close
// animation.
-ui::Transform GetSlowCloseTransform() {
+gfx::Transform GetSlowCloseTransform() {
gfx::Size root_size = Shell::GetPrimaryRootWindow()->bounds().size();
- ui::Transform transform;
+ gfx::Transform transform;
transform.SetScale(kSlowCloseSizeRatio, kSlowCloseSizeRatio);
transform.ConcatTranslate(
floor(0.5 * (1.0 - kSlowCloseSizeRatio) * root_size.width() + 0.5),
@@ -50,9 +50,9 @@ ui::Transform GetSlowCloseTransform() {
// Returns the transform that should be applied to containers for the fast-close
// animation.
-ui::Transform GetFastCloseTransform() {
+gfx::Transform GetFastCloseTransform() {
gfx::Size root_size = Shell::GetPrimaryRootWindow()->bounds().size();
- ui::Transform transform;
+ gfx::Transform transform;
transform.SetScale(0.0, 0.0);
transform.ConcatTranslate(floor(0.5 * root_size.width() + 0.5),
floor(0.5 * root_size.height() + 0.5));
@@ -79,7 +79,7 @@ void StartUndoSlowCloseAnimationForWindow(aura::Window* window) {
animator->StartAnimation(
new ui::LayerAnimationSequence(
ui::LayerAnimationElement::CreateTransformElement(
- ui::Transform(),
+ gfx::Transform(),
base::TimeDelta::FromMilliseconds(kUndoSlowCloseAnimMs))));
}
@@ -119,7 +119,7 @@ void HideWindow(aura::Window* window) {
// Restores |window| to its original position and scale and full opacity
// instantaneously.
void RestoreWindow(aura::Window* window) {
- window->layer()->SetTransform(ui::Transform());
+ window->layer()->SetTransform(gfx::Transform());
window->layer()->SetOpacity(1.0);
}
@@ -145,7 +145,7 @@ bool SessionStateAnimator::TestApi::ContainersAreAnimated(
return false;
break;
case ANIMATION_UNDO_SLOW_CLOSE:
- if (layer->GetTargetTransform() != ui::Transform())
+ if (layer->GetTargetTransform() != gfx::Transform())
return false;
break;
case ANIMATION_FAST_CLOSE:
@@ -162,7 +162,7 @@ bool SessionStateAnimator::TestApi::ContainersAreAnimated(
return false;
break;
case ANIMATION_RESTORE:
- if (layer->opacity() < 0.9999 || layer->transform() != ui::Transform())
+ if (layer->opacity() < 0.9999 || layer->transform() != gfx::Transform())
return false;
break;
default:
« no previous file with comments | « ash/wm/image_grid.cc ('k') | ash/wm/window_animations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698