summaryrefslogtreecommitdiffstats
path: root/ash/wm/session_state_animator.cc
diff options
context:
space:
mode:
authorshawnsingh@chromium.org <shawnsingh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-14 18:15:35 +0000
committershawnsingh@chromium.org <shawnsingh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-14 18:15:35 +0000
commit0f0453e90e6a85e469e138f048d2c1ae9a80e561 (patch)
treee60da12bc146144f88dea794b5e45c6785c7169e /ash/wm/session_state_animator.cc
parent4addcf3492db52c49f57d168d2bef07c46d411bd (diff)
downloadchromium_src-0f0453e90e6a85e469e138f048d2c1ae9a80e561.zip
chromium_src-0f0453e90e6a85e469e138f048d2c1ae9a80e561.tar.gz
chromium_src-0f0453e90e6a85e469e138f048d2c1ae9a80e561.tar.bz2
Migrate ui::Transform to gfx::Transform
It is more appropriate for Transform class to belong with its fellow geometry classes in the gfx namespace. Review URL: https://chromiumcodereview.appspot.com/11145005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161809 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/session_state_animator.cc')
-rw-r--r--ash/wm/session_state_animator.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/ash/wm/session_state_animator.cc b/ash/wm/session_state_animator.cc
index 41a1996..180a034 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: