From 0f0453e90e6a85e469e138f048d2c1ae9a80e561 Mon Sep 17 00:00:00 2001 From: "shawnsingh@chromium.org" Date: Sun, 14 Oct 2012 18:15:35 +0000 Subject: 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 --- ash/launcher/app_list_button.cc | 2 +- ash/launcher/overflow_button.cc | 6 ++-- ash/magnifier/magnification_controller.cc | 2 +- ash/rotator/screen_rotation.cc | 2 +- ash/system/tray/system_tray_bubble.cc | 6 ++-- ash/system/tray/tray_item_view.cc | 2 +- .../web_notification/web_notification_view.cc | 6 ++-- ash/wm/gestures/long_press_affordance_handler.cc | 2 +- ash/wm/image_grid.cc | 16 ++++----- ash/wm/session_state_animator.cc | 16 ++++----- ash/wm/window_animations.cc | 41 +++++++++++----------- ash/wm/window_animations_unittest.cc | 8 ++--- ash/wm/window_manager_unittest.cc | 2 +- ash/wm/workspace/workspace_animations.cc | 14 ++++---- 14 files changed, 63 insertions(+), 62 deletions(-) (limited to 'ash') diff --git a/ash/launcher/app_list_button.cc b/ash/launcher/app_list_button.cc index 26ebb5b..ced4e2b 100644 --- a/ash/launcher/app_list_button.cc +++ b/ash/launcher/app_list_button.cc @@ -86,7 +86,7 @@ void AppListButton::StopLoadingAnimation() { settings.SetTransitionDuration( base::TimeDelta::FromMilliseconds(kAnimationDurationInMs)); layer()->SetOpacity(1.0f); - layer()->SetTransform(ui::Transform()); + layer()->SetTransform(gfx::Transform()); } bool AppListButton::OnMousePressed(const ui::MouseEvent& event) { diff --git a/ash/launcher/overflow_button.cc b/ash/launcher/overflow_button.cc index a0673a0..fa76fd3 100644 --- a/ash/launcher/overflow_button.cc +++ b/ash/launcher/overflow_button.cc @@ -28,13 +28,13 @@ const int kButtonHoverSize = 28; const int kBackgroundOffset = (48 - kButtonHoverSize) / 2; -void RotateCounterclockwise(ui::Transform* transform) { +void RotateCounterclockwise(gfx::Transform* transform) { transform->matrix().set3x3(0, -1, 0, 1, 0, 0, 0, 0, 1); } -void RotateClockwise(ui::Transform* transform) { +void RotateClockwise(gfx::Transform* transform) { transform->matrix().set3x3( 0, 1, 0, -1, 0, 0, 0, 0, 1); @@ -107,7 +107,7 @@ void OverflowButton::OnPaint(gfx::Canvas* canvas) { if (height() < kButtonHoverSize) return; - ui::Transform transform; + gfx::Transform transform; switch (alignment_) { case SHELF_ALIGNMENT_BOTTOM: diff --git a/ash/magnifier/magnification_controller.cc b/ash/magnifier/magnification_controller.cc index be1482b..f0ab732 100644 --- a/ash/magnifier/magnification_controller.cc +++ b/ash/magnifier/magnification_controller.cc @@ -196,7 +196,7 @@ bool MagnificationControllerImpl::RedrawDIP(const gfx::Point& position_in_dip, scale_ = scale; // Creates transform matrix. - ui::Transform transform; + gfx::Transform transform; // Flips the signs intentionally to convert them from the position of the // magnification window. transform.ConcatTranslate(-origin_.x(), -origin_.y()); diff --git a/ash/rotator/screen_rotation.cc b/ash/rotator/screen_rotation.cc index c4c5eeb..d4330a4 100644 --- a/ash/rotator/screen_rotation.cc +++ b/ash/rotator/screen_rotation.cc @@ -45,7 +45,7 @@ void ScreenRotation::OnStart(ui::LayerAnimationDelegate* delegate) { if (degrees_ == 0) return; - const ui::Transform& current_transform = + const gfx::Transform& current_transform = delegate->GetTransformForAnimation(); const gfx::Rect& bounds = delegate->GetBoundsForAnimation(); diff --git a/ash/system/tray/system_tray_bubble.cc b/ash/system/tray/system_tray_bubble.cc index b5e2470..0330bf3 100644 --- a/ash/system/tray/system_tray_bubble.cc +++ b/ash/system/tray/system_tray_bubble.cc @@ -167,7 +167,7 @@ void SystemTrayBubble::UpdateView( settings.AddObserver(new AnimationObserverDeleteLayer(layer)); settings.SetTransitionDuration(swipe_duration); settings.SetTweenType(ui::Tween::EASE_OUT); - ui::Transform transform; + gfx::Transform transform; transform.SetTranslateX(layer->bounds().width()); layer->SetTransform(transform); } @@ -220,7 +220,7 @@ void SystemTrayBubble::UpdateView( if (bubble_type == BUBBLE_TYPE_DETAILED) { ui::Layer* new_layer = bubble_view_->layer(); gfx::Rect bounds = new_layer->bounds(); - ui::Transform transform; + gfx::Transform transform; transform.SetTranslateX(bounds.width()); new_layer->SetTransform(transform); { @@ -228,7 +228,7 @@ void SystemTrayBubble::UpdateView( settings.AddObserver(new AnimationObserverDeleteLayer(layer)); settings.SetTransitionDuration(swipe_duration); settings.SetTweenType(ui::Tween::EASE_OUT); - new_layer->SetTransform(ui::Transform()); + new_layer->SetTransform(gfx::Transform()); } } } diff --git a/ash/system/tray/tray_item_view.cc b/ash/system/tray/tray_item_view.cc index 6bfc073..23f0d53 100644 --- a/ash/system/tray/tray_item_view.cc +++ b/ash/system/tray/tray_item_view.cc @@ -94,7 +94,7 @@ void TrayItemView::ChildPreferredSizeChanged(views::View* child) { } void TrayItemView::AnimationProgressed(const ui::Animation* animation) { - ui::Transform transform; + gfx::Transform transform; transform.SetScale(animation->GetCurrentValue(), animation->GetCurrentValue()); transform.ConcatTranslate(0, animation->CurrentValueBetween( diff --git a/ash/system/web_notification/web_notification_view.cc b/ash/system/web_notification/web_notification_view.cc index 5919112..faa3714 100644 --- a/ash/system/web_notification/web_notification_view.cc +++ b/ash/system/web_notification/web_notification_view.cc @@ -245,7 +245,7 @@ ui::EventResult WebNotificationView::OnGestureEvent( // The scroll-update events include the incremental scroll amount. gesture_scroll_amount_ += event.details().scroll_x(); - ui::Transform transform; + gfx::Transform transform; transform.SetTranslateX(gesture_scroll_amount_); layer()->SetTransform(transform); layer()->SetOpacity( @@ -298,7 +298,7 @@ void WebNotificationView::RestoreVisualState() { ui::ScopedLayerAnimationSettings settings(layer()->GetAnimator()); settings.SetTransitionDuration( base::TimeDelta::FromMilliseconds(kSwipeRestoreDurationMS)); - layer()->SetTransform(ui::Transform()); + layer()->SetTransform(gfx::Transform()); layer()->SetOpacity(1.f); } @@ -310,7 +310,7 @@ void WebNotificationView::SlideOutAndClose(SlideDirection direction) { base::TimeDelta::FromMilliseconds(swipe_out_duration)); settings.AddObserver(this); - ui::Transform transform; + gfx::Transform transform; transform.SetTranslateX(direction == SLIDE_LEFT ? -width() : width()); layer()->SetTransform(transform); layer()->SetOpacity(0.f); diff --git a/ash/wm/gestures/long_press_affordance_handler.cc b/ash/wm/gestures/long_press_affordance_handler.cc index 683741f2..5c4e09d 100644 --- a/ash/wm/gestures/long_press_affordance_handler.cc +++ b/ash/wm/gestures/long_press_affordance_handler.cc @@ -200,7 +200,7 @@ class LongPressAffordanceHandler::LongPressAffordanceView GetPreferredSize().height() / 2); canvas->Save(); - ui::Transform scale; + gfx::Transform scale; scale.SetScale(current_scale_, current_scale_); // We want to scale from the center. canvas->Translate(gfx::Point(center.x(), center.y())); diff --git a/ash/wm/image_grid.cc b/ash/wm/image_grid.cc index 5b275e3..facd566 100644 --- a/ash/wm/image_grid.cc +++ b/ash/wm/image_grid.cc @@ -105,7 +105,7 @@ void ImageGrid::SetSize(const gfx::Size& size) { if (top_layer_.get()) { if (center_width > 0) { - ui::Transform transform; + gfx::Transform transform; transform.SetScaleX( static_cast(center_width) / top_layer_->bounds().width()); transform.ConcatTranslate(left, 0); @@ -115,7 +115,7 @@ void ImageGrid::SetSize(const gfx::Size& size) { } if (bottom_layer_.get()) { if (center_width > 0) { - ui::Transform transform; + gfx::Transform transform; transform.SetScaleX( static_cast(center_width) / bottom_layer_->bounds().width()); transform.ConcatTranslate( @@ -126,7 +126,7 @@ void ImageGrid::SetSize(const gfx::Size& size) { } if (left_layer_.get()) { if (center_height > 0) { - ui::Transform transform; + gfx::Transform transform; transform.SetScaleY( (static_cast(center_height) / left_layer_->bounds().height())); transform.ConcatTranslate(0, top); @@ -136,7 +136,7 @@ void ImageGrid::SetSize(const gfx::Size& size) { } if (right_layer_.get()) { if (center_height > 0) { - ui::Transform transform; + gfx::Transform transform; transform.SetScaleY( static_cast(center_height) / right_layer_->bounds().height()); transform.ConcatTranslate( @@ -155,7 +155,7 @@ void ImageGrid::SetSize(const gfx::Size& size) { top_left_layer_.get()); } if (top_right_layer_.get()) { - ui::Transform transform; + gfx::Transform transform; transform.SetTranslateX(size.width() - top_right_layer_->bounds().width()); top_right_layer_->SetTransform(transform); top_right_painter_->SetClipRect( @@ -166,7 +166,7 @@ void ImageGrid::SetSize(const gfx::Size& size) { top_right_layer_.get()); } if (bottom_left_layer_.get()) { - ui::Transform transform; + gfx::Transform transform; transform.SetTranslateY( size.height() - bottom_left_layer_->bounds().height()); bottom_left_layer_->SetTransform(transform); @@ -178,7 +178,7 @@ void ImageGrid::SetSize(const gfx::Size& size) { bottom_left_layer_.get()); } if (bottom_right_layer_.get()) { - ui::Transform transform; + gfx::Transform transform; transform.SetTranslate( size.width() - bottom_right_layer_->bounds().width(), size.height() - bottom_right_layer_->bounds().height()); @@ -194,7 +194,7 @@ void ImageGrid::SetSize(const gfx::Size& size) { if (center_layer_.get()) { if (center_width > 0 && center_height > 0) { - ui::Transform transform; + gfx::Transform transform; transform.SetScale(center_width / center_layer_->bounds().width(), center_height / center_layer_->bounds().height()); transform.ConcatTranslate(left, top); 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: diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc index 72421c7..66831b2 100644 --- a/ash/wm/window_animations.cc +++ b/ash/wm/window_animations.cc @@ -236,8 +236,8 @@ class WorkspaceHidingWindowAnimationObserver // its visibility to true, and its transform from |start_transform| to // |end_transform|. void AnimateShowWindowCommon(aura::Window* window, - const ui::Transform& start_transform, - const ui::Transform& end_transform) { + const gfx::Transform& start_transform, + const gfx::Transform& end_transform) { window->layer()->set_delegate(window); window->layer()->SetOpacity(kWindowAnimation_HideOpacity); window->layer()->SetTransform(start_transform); @@ -258,7 +258,7 @@ void AnimateShowWindowCommon(aura::Window* window, // Hides a window using an animation, animating its opacity from 1.f to 0.f, // its visibility to false, and its transform to |end_transform|. void AnimateHideWindowCommon(aura::Window* window, - const ui::Transform& end_transform) { + const gfx::Transform& end_transform) { window->layer()->set_delegate(NULL); // Property sets within this scope will be implicitly animated. @@ -276,18 +276,18 @@ void AnimateHideWindowCommon(aura::Window* window, // Show/Hide windows using a shrink animation. void AnimateShowWindow_Drop(aura::Window* window) { - ui::Transform transform; + gfx::Transform transform; transform.ConcatScale(kWindowAnimation_ScaleFactor, kWindowAnimation_ScaleFactor); gfx::Rect bounds = window->bounds(); transform.ConcatTranslate( kWindowAnimation_TranslateFactor * bounds.width(), kWindowAnimation_TranslateFactor * bounds.height()); - AnimateShowWindowCommon(window, transform, ui::Transform()); + AnimateShowWindowCommon(window, transform, gfx::Transform()); } void AnimateHideWindow_Drop(aura::Window* window) { - ui::Transform transform; + gfx::Transform transform; transform.ConcatScale(kWindowAnimation_ScaleFactor, kWindowAnimation_ScaleFactor); gfx::Rect bounds = window->bounds(); @@ -299,14 +299,14 @@ void AnimateHideWindow_Drop(aura::Window* window) { // Show/Hide windows using a vertical Glenimation. void AnimateShowWindow_Vertical(aura::Window* window) { - ui::Transform transform; + gfx::Transform transform; transform.ConcatTranslate(0, window->GetProperty( kWindowVisibilityAnimationVerticalPositionKey)); - AnimateShowWindowCommon(window, transform, ui::Transform()); + AnimateShowWindowCommon(window, transform, gfx::Transform()); } void AnimateHideWindow_Vertical(aura::Window* window) { - ui::Transform transform; + gfx::Transform transform; transform.ConcatTranslate(0, window->GetProperty( kWindowVisibilityAnimationVerticalPositionKey)); AnimateHideWindowCommon(window, transform); @@ -314,16 +314,17 @@ void AnimateHideWindow_Vertical(aura::Window* window) { // Show/Hide windows using a fade. void AnimateShowWindow_Fade(aura::Window* window) { - AnimateShowWindowCommon(window, ui::Transform(), ui::Transform()); + AnimateShowWindowCommon(window, gfx::Transform(), gfx::Transform()); } void AnimateHideWindow_Fade(aura::Window* window) { - AnimateHideWindowCommon(window, ui::Transform()); + AnimateHideWindowCommon(window, gfx::Transform()); } // Builds the transform used when switching workspaces for the specified // window. -ui::Transform BuildWorkspaceSwitchTransform(aura::Window* window, float scale) { +gfx::Transform BuildWorkspaceSwitchTransform(aura::Window* window, + float scale) { // Animations for transitioning workspaces scale all windows. To give the // effect of scaling from the center of the screen the windows are translated. gfx::Rect bounds = window->bounds(); @@ -336,7 +337,7 @@ ui::Transform BuildWorkspaceSwitchTransform(aura::Window* window, float scale) { float initial_y = (static_cast(bounds.y()) - mid_y) * scale + mid_y; - ui::Transform transform; + gfx::Transform transform; transform.ConcatTranslate( initial_x - static_cast(bounds.x()), initial_y - static_cast(bounds.y())); @@ -345,7 +346,7 @@ ui::Transform BuildWorkspaceSwitchTransform(aura::Window* window, float scale) { } void AnimateShowWindow_Workspace(aura::Window* window) { - ui::Transform transform( + gfx::Transform transform( BuildWorkspaceSwitchTransform(window, kWorkspaceScale)); // When we call SetOpacity here, if a hide sequence is already running, // the default animation preemption strategy fast forwards the hide sequence @@ -360,7 +361,7 @@ void AnimateShowWindow_Workspace(aura::Window* window) { // Property sets within this scope will be implicitly animated. ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator()); - window->layer()->SetTransform(ui::Transform()); + window->layer()->SetTransform(gfx::Transform()); // Opacity animates only during the first half of the animation. settings.SetTransitionDuration(settings.GetTransitionDuration() / 2); window->layer()->SetOpacity(1.0f); @@ -368,10 +369,10 @@ void AnimateShowWindow_Workspace(aura::Window* window) { } void AnimateHideWindow_Workspace(aura::Window* window) { - ui::Transform transform( + gfx::Transform transform( BuildWorkspaceSwitchTransform(window, kWorkspaceScale)); window->layer()->SetOpacity(1.0f); - window->layer()->SetTransform(ui::Transform()); + window->layer()->SetTransform(gfx::Transform()); // Opacity animates from 1 to 0 only over the second half of the animation. To // get this functionality two animations are schedule for opacity, the first @@ -710,7 +711,7 @@ TimeDelta CrossFadeImpl(aura::Window* window, settings.AddObserver(new internal::CrossFadeObserver(window, old_layer)); settings.SetTransitionDuration(duration); settings.SetTweenType(tween_type); - ui::Transform out_transform; + gfx::Transform out_transform; float scale_x = static_cast(new_bounds.width()) / static_cast(old_bounds.width()); float scale_y = static_cast(new_bounds.height()) / @@ -730,7 +731,7 @@ TimeDelta CrossFadeImpl(aura::Window* window, // Set the new layer's current transform, such that the user sees a scaled // version of the window with the original bounds at the original position. - ui::Transform in_transform; + gfx::Transform in_transform; const float scale_x = static_cast(old_bounds.width()) / static_cast(new_bounds.width()); const float scale_y = static_cast(old_bounds.height()) / @@ -750,7 +751,7 @@ TimeDelta CrossFadeImpl(aura::Window* window, ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator()); settings.SetTransitionDuration(duration); settings.SetTweenType(tween_type); - window->layer()->SetTransform(ui::Transform()); + window->layer()->SetTransform(gfx::Transform()); if (!old_on_top) { // New layer is on top, fade it in. window->layer()->SetOpacity(1.f); diff --git a/ash/wm/window_animations_unittest.cc b/ash/wm/window_animations_unittest.cc index dd316e8..ee6a1c9 100644 --- a/ash/wm/window_animations_unittest.cc +++ b/ash/wm/window_animations_unittest.cc @@ -169,13 +169,13 @@ TEST_F(WindowAnimationsTest, CrossFadeToBounds) { // Original layer stays opaque and stretches to new size. EXPECT_EQ(1.0f, old_layer->GetTargetOpacity()); EXPECT_EQ("5,10 320x240", old_layer->bounds().ToString()); - ui::Transform grow_transform; + gfx::Transform grow_transform; grow_transform.ConcatScale(640.f / 320.f, 480.f / 240.f); grow_transform.ConcatTranslate(-5.f, -10.f); EXPECT_EQ(grow_transform, old_layer->GetTargetTransform()); // New layer animates in to the identity transform. EXPECT_EQ(1.0f, window->layer()->GetTargetOpacity()); - EXPECT_EQ(ui::Transform(), window->layer()->GetTargetTransform()); + EXPECT_EQ(gfx::Transform(), window->layer()->GetTargetTransform()); // Run the animations to completion. static_cast(old_layer->GetAnimator())->Step( @@ -191,13 +191,13 @@ TEST_F(WindowAnimationsTest, CrossFadeToBounds) { // Original layer fades out and stretches down to new size. EXPECT_EQ(0.0f, old_layer->GetTargetOpacity()); EXPECT_EQ("0,0 640x480", old_layer->bounds().ToString()); - ui::Transform shrink_transform; + gfx::Transform shrink_transform; shrink_transform.ConcatScale(320.f / 640.f, 240.f / 480.f); shrink_transform.ConcatTranslate(5.f, 10.f); EXPECT_EQ(shrink_transform, old_layer->GetTargetTransform()); // New layer animates in to the identity transform. EXPECT_EQ(1.0f, window->layer()->GetTargetOpacity()); - EXPECT_EQ(ui::Transform(), window->layer()->GetTargetTransform()); + EXPECT_EQ(gfx::Transform(), window->layer()->GetTargetTransform()); static_cast(old_layer->GetAnimator())->Step( base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1)); diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc index 5d81e6d..4b83e69 100644 --- a/ash/wm/window_manager_unittest.cc +++ b/ash/wm/window_manager_unittest.cc @@ -469,7 +469,7 @@ TEST_F(WindowManagerTest, MAYBE_TransformActivate) { gfx::Point()).bounds().ToString()); // Rotate it clock-wise 90 degrees. - ui::Transform transform; + gfx::Transform transform; transform.SetRotate(90.0f); transform.ConcatTranslate(size.width(), 0); root_window->SetTransform(transform); diff --git a/ash/wm/workspace/workspace_animations.cc b/ash/wm/workspace/workspace_animations.cc index 745adf8..ae93f6b 100644 --- a/ash/wm/workspace/workspace_animations.cc +++ b/ash/wm/workspace/workspace_animations.cc @@ -33,7 +33,7 @@ enum WorkspaceScaleType { void ApplyWorkspaceScale(ui::Layer* layer, WorkspaceScaleType type) { const float scale = type == WORKSPACE_SCALE_ABOVE ? kWorkspaceScaleAbove : kWorkspaceScaleBelow; - ui::Transform transform; + gfx::Transform transform; transform.ConcatScale(scale, scale); transform.ConcatTranslate( -layer->bounds().width() * (scale - 1.0f) / 2, @@ -70,7 +70,7 @@ void ShowWorkspace(aura::Window* window, if (!details.animate || CommandLine::ForCurrentProcess()->HasSwitch( ash::switches::kAshWindowAnimationsDisabled)) { window->layer()->SetOpacity(1.0f); - window->layer()->SetTransform(ui::Transform()); + window->layer()->SetTransform(gfx::Transform()); return; } @@ -80,7 +80,7 @@ void ShowWorkspace(aura::Window* window, details.direction == WORKSPACE_ANIMATE_UP ? WORKSPACE_SCALE_BELOW : WORKSPACE_SCALE_ABOVE); } else { - window->layer()->SetTransform(ui::Transform()); + window->layer()->SetTransform(gfx::Transform()); } // In order for pause to work we need to stop animations. @@ -102,14 +102,14 @@ void ShowWorkspace(aura::Window* window, settings.SetTweenType(kWorkspaceTweenType); settings.SetTransitionDuration(DurationForWorkspaceShowOrHide(details)); - window->layer()->SetTransform(ui::Transform()); + window->layer()->SetTransform(gfx::Transform()); window->layer()->SetOpacity(1.0f); } } void HideWorkspace(aura::Window* window, const WorkspaceAnimationDetails& details) { - window->layer()->SetTransform(ui::Transform()); + window->layer()->SetTransform(gfx::Transform()); window->layer()->SetOpacity(1.0f); window->layer()->GetAnimator()->StopAnimating(); @@ -138,7 +138,7 @@ void HideWorkspace(aura::Window* window, details.direction == WORKSPACE_ANIMATE_UP ? WORKSPACE_SCALE_ABOVE : WORKSPACE_SCALE_BELOW); } else { - window->layer()->SetTransform(ui::Transform()); + window->layer()->SetTransform(gfx::Transform()); } // NOTE: Hide() must be before SetOpacity(), else @@ -154,7 +154,7 @@ void HideWorkspace(aura::Window* window, // version. settings.SetPreemptionStrategy(ui::LayerAnimator::ENQUEUE_NEW_ANIMATION); settings.SetTransitionDuration(base::TimeDelta()); - window->layer()->SetTransform(ui::Transform()); + window->layer()->SetTransform(gfx::Transform()); } } // namespace internal -- cgit v1.1