diff options
Diffstat (limited to 'ash/wm')
-rw-r--r-- | ash/wm/frame_painter.cc | 8 | ||||
-rw-r--r-- | ash/wm/frame_painter.h | 12 | ||||
-rw-r--r-- | ash/wm/gestures/long_press_affordance_handler.cc | 8 | ||||
-rw-r--r-- | ash/wm/gestures/long_press_affordance_handler.h | 14 | ||||
-rw-r--r-- | ash/wm/maximize_bubble_controller.cc | 6 | ||||
-rw-r--r-- | ash/wm/panels/panel_frame_view.cc | 2 | ||||
-rw-r--r-- | ash/wm/session_state_animator.cc | 14 | ||||
-rw-r--r-- | ash/wm/system_gesture_event_filter.h | 2 | ||||
-rw-r--r-- | ash/wm/window_animations.cc | 10 | ||||
-rw-r--r-- | ash/wm/window_animations_unittest.cc | 14 | ||||
-rw-r--r-- | ash/wm/workspace/alternate_frame_caption_button.cc | 8 | ||||
-rw-r--r-- | ash/wm/workspace/alternate_frame_caption_button.h | 10 | ||||
-rw-r--r-- | ash/wm/workspace/desktop_background_fade_controller.cc | 6 | ||||
-rw-r--r-- | ash/wm/workspace/phantom_window_controller.cc | 8 | ||||
-rw-r--r-- | ash/wm/workspace/phantom_window_controller.h | 12 | ||||
-rw-r--r-- | ash/wm/workspace/workspace_window_resizer_unittest.cc | 7 | ||||
-rw-r--r-- | ash/wm/workspace_controller.cc | 2 |
17 files changed, 70 insertions, 73 deletions
diff --git a/ash/wm/frame_painter.cc b/ash/wm/frame_painter.cc index 45492df..3528f35 100644 --- a/ash/wm/frame_painter.cc +++ b/ash/wm/frame_painter.cc @@ -25,11 +25,11 @@ #include "ui/aura/env.h" #include "ui/aura/root_window.h" #include "ui/aura/window.h" -#include "ui/base/animation/slide_animation.h" #include "ui/base/hit_test.h" #include "ui/base/layout.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/theme_provider.h" +#include "ui/gfx/animation/slide_animation.h" #include "ui/gfx/canvas.h" #include "ui/gfx/font.h" #include "ui/gfx/image/image.h" @@ -418,7 +418,7 @@ void FramePainter::PaintHeader(views::NonClientFrameView* view, parent->layer()->GetAnimator()->IsAnimatingProperty( ui::LayerAnimationElement::VISIBILITY)); if (!parent_animating) { - crossfade_animation_.reset(new ui::SlideAnimation(this)); + crossfade_animation_.reset(new gfx::SlideAnimation(this)); crossfade_theme_frame_id_ = previous_theme_frame_id_; crossfade_theme_frame_overlay_id_ = previous_theme_frame_overlay_id_; crossfade_opacity_ = previous_opacity_; @@ -702,9 +702,9 @@ void FramePainter::OnWindowRemovingFromRootWindow(aura::Window* window) { } /////////////////////////////////////////////////////////////////////////////// -// ui::AnimationDelegate overrides: +// gfx::AnimationDelegate overrides: -void FramePainter::AnimationProgressed(const ui::Animation* animation) { +void FramePainter::AnimationProgressed(const gfx::Animation* animation) { frame_->non_client_view()->SchedulePaintInRect(header_frame_bounds_); } diff --git a/ash/wm/frame_painter.h b/ash/wm/frame_painter.h index a5d40fb..d790221 100644 --- a/ash/wm/frame_painter.h +++ b/ash/wm/frame_painter.h @@ -12,7 +12,7 @@ #include "base/gtest_prod_util.h" #include "base/memory/scoped_ptr.h" #include "ui/aura/window_observer.h" -#include "ui/base/animation/animation_delegate.h" +#include "ui/gfx/animation/animation_delegate.h" #include "ui/gfx/rect.h" namespace aura { @@ -25,8 +25,6 @@ class Font; class ImageSkia; class Point; class Size; -} -namespace ui { class SlideAnimation; } namespace views { @@ -42,7 +40,7 @@ class FrameCaptionButtonContainerView; // various implementations of views::NonClientFrameView. Canonical source of // layout constants for Ash window frames. class ASH_EXPORT FramePainter : public aura::WindowObserver, - public ui::AnimationDelegate, + public gfx::AnimationDelegate, public wm::WindowSettings::Observer { public: // Opacity values for the window header in various states, from 0 to 255. @@ -151,8 +149,8 @@ class ASH_EXPORT FramePainter : public aura::WindowObserver, virtual void OnTrackedByWorkspaceChanged(aura::Window* window, bool old) OVERRIDE; - // Overridden from ui::AnimationDelegate - virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; + // Overridden from gfx::AnimationDelegate + virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; private: FRIEND_TEST_ALL_PREFIXES(FramePainterTest, CreateAndDeleteSingleWindow); @@ -238,7 +236,7 @@ class ASH_EXPORT FramePainter : public aura::WindowObserver, int crossfade_opacity_; gfx::Rect header_frame_bounds_; - scoped_ptr<ui::SlideAnimation> crossfade_animation_; + scoped_ptr<gfx::SlideAnimation> crossfade_animation_; DISALLOW_COPY_AND_ASSIGN(FramePainter); }; diff --git a/ash/wm/gestures/long_press_affordance_handler.cc b/ash/wm/gestures/long_press_affordance_handler.cc index 8b8468f..516f4c7 100644 --- a/ash/wm/gestures/long_press_affordance_handler.cc +++ b/ash/wm/gestures/long_press_affordance_handler.cc @@ -165,7 +165,7 @@ class LongPressAffordanceHandler::LongPressAffordanceView virtual ~LongPressAffordanceView() { } - void UpdateWithGrowAnimation(ui::Animation* animation) { + void UpdateWithGrowAnimation(gfx::Animation* animation) { // Update the portion of the circle filled so far and re-draw. current_angle_ = animation->CurrentValueBetween(kAffordanceAngleStartValue, kAffordanceAngleEndValue); @@ -177,7 +177,7 @@ class LongPressAffordanceHandler::LongPressAffordanceView SchedulePaint(); } - void UpdateWithShrinkAnimation(ui::Animation* animation) { + void UpdateWithShrinkAnimation(gfx::Animation* animation) { current_scale_ = animation->CurrentValueBetween(kAffordanceScaleEndValue, kAffordanceShrinkScaleEndValue); widget_->GetNativeView()->layer()->SetOpacity( @@ -236,7 +236,7 @@ class LongPressAffordanceHandler::LongPressAffordanceView // LongPressAffordanceHandler, public LongPressAffordanceHandler::LongPressAffordanceHandler() - : ui::LinearAnimation(kAffordanceFrameRateHz, this), + : gfx::LinearAnimation(kAffordanceFrameRateHz, this), tap_down_touch_id_(-1), tap_down_display_id_(0), current_animation_type_(NONE) {} @@ -351,7 +351,7 @@ bool LongPressAffordanceHandler::ShouldSendCanceledFromStop() { } void LongPressAffordanceHandler::AnimationEnded( - const ui::Animation* animation) { + const gfx::Animation* animation) { switch (current_animation_type_) { case GROW_ANIMATION: current_animation_type_ = SHRINK_ANIMATION; diff --git a/ash/wm/gestures/long_press_affordance_handler.h b/ash/wm/gestures/long_press_affordance_handler.h index 14ff0f3..5fe6e00 100644 --- a/ash/wm/gestures/long_press_affordance_handler.h +++ b/ash/wm/gestures/long_press_affordance_handler.h @@ -6,8 +6,8 @@ #define ASH_WM_GESTURES_LONG_PRESS_AFFORDANCE_HANDLER_H_ #include "base/timer/timer.h" -#include "ui/base/animation/animation_delegate.h" -#include "ui/base/animation/linear_animation.h" +#include "ui/gfx/animation/animation_delegate.h" +#include "ui/gfx/animation/linear_animation.h" #include "ui/gfx/point.h" namespace aura { @@ -33,8 +33,8 @@ namespace internal { // during grow animation. // The second part is a shrink animation that start after grow and shrinks the // affordance out of view. -class LongPressAffordanceHandler : public ui::AnimationDelegate, - public ui::LinearAnimation { +class LongPressAffordanceHandler : public gfx::AnimationDelegate, + public gfx::LinearAnimation { public: LongPressAffordanceHandler(); virtual ~LongPressAffordanceHandler(); @@ -56,12 +56,12 @@ class LongPressAffordanceHandler : public ui::AnimationDelegate, void StartAnimation(); void StopAnimation(); - // Overridden from ui::LinearAnimation. + // Overridden from gfx::LinearAnimation. virtual void AnimateToState(double state) OVERRIDE; virtual bool ShouldSendCanceledFromStop() OVERRIDE; - // Overridden from ui::AnimationDelegate. - virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; + // Overridden from gfx::AnimationDelegate. + virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE; class LongPressAffordanceView; scoped_ptr<LongPressAffordanceView> view_; diff --git a/ash/wm/maximize_bubble_controller.cc b/ash/wm/maximize_bubble_controller.cc index 68cbfd9..10f25b3 100644 --- a/ash/wm/maximize_bubble_controller.cc +++ b/ash/wm/maximize_bubble_controller.cc @@ -14,9 +14,9 @@ #include "grit/ash_strings.h" #include "third_party/skia/include/core/SkPath.h" #include "ui/aura/window.h" -#include "ui/base/animation/animation.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/gfx/animation/animation.h" #include "ui/gfx/canvas.h" #include "ui/gfx/path.h" #include "ui/gfx/screen.h" @@ -218,7 +218,7 @@ class MaximizeBubbleController::Bubble : public views::BubbleDelegateView, // Overridden from views::BubbleDelegateView. virtual gfx::Rect GetAnchorRect() OVERRIDE; - virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; + virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; virtual bool CanActivate() const OVERRIDE { return false; } // Overridden from views::WidgetDelegateView. @@ -457,7 +457,7 @@ gfx::Rect MaximizeBubbleController::Bubble::GetAnchorRect() { } void MaximizeBubbleController::Bubble::AnimationProgressed( - const ui::Animation* animation) { + const gfx::Animation* animation) { // First do everything needed for the fade by calling the base function. BubbleDelegateView::AnimationProgressed(animation); // When fading in we are done. diff --git a/ash/wm/panels/panel_frame_view.cc b/ash/wm/panels/panel_frame_view.cc index db137fa..6f985bf 100644 --- a/ash/wm/panels/panel_frame_view.cc +++ b/ash/wm/panels/panel_frame_view.cc @@ -8,11 +8,11 @@ #include "ash/wm/workspace/frame_caption_button_container_view.h" #include "grit/ash_resources.h" #include "third_party/skia/include/core/SkPaint.h" -#include "ui/base/animation/throb_animation.h" #include "ui/base/cursor/cursor.h" #include "ui/base/hit_test.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/gfx/animation/throb_animation.h" #include "ui/gfx/canvas.h" #include "ui/gfx/font.h" #include "ui/gfx/image/image.h" diff --git a/ash/wm/session_state_animator.cc b/ash/wm/session_state_animator.cc index 35ac4cc..81e3fcc 100644 --- a/ash/wm/session_state_animator.cc +++ b/ash/wm/session_state_animator.cc @@ -163,11 +163,11 @@ void HideWindow(aura::Window* window, ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); settings.SetTransitionDuration(duration); - settings.SetTweenType(ui::Tween::EASE_OUT); + settings.SetTweenType(gfx::Tween::EASE_OUT); SetTransformForScaleAnimation(layer, above ? LAYER_SCALE_ANIMATION_ABOVE : LAYER_SCALE_ANIMATION_BELOW); - settings.SetTweenType(ui::Tween::EASE_IN_OUT); + settings.SetTweenType(gfx::Tween::EASE_IN_OUT); layer->SetOpacity(0.0f); // After the animation completes snap the transform back to the identity, @@ -203,10 +203,10 @@ void TransformWindowToBaseState(aura::Window* window, ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); settings.SetTransitionDuration(duration); - settings.SetTweenType(ui::Tween::EASE_OUT); + settings.SetTweenType(gfx::Tween::EASE_OUT); layer->SetTransform(gfx::Transform()); - settings.SetTweenType(ui::Tween::EASE_IN_OUT); + settings.SetTweenType(gfx::Tween::EASE_IN_OUT); layer->SetOpacity(1.0f); // A bit of a dirty trick: we need to catch the end of the animation we don't @@ -246,7 +246,7 @@ void StartGrayscaleBrightnessAnimationForWindow( aura::Window* window, float target, base::TimeDelta duration, - ui::Tween::Type tween_type, + gfx::Tween::Type tween_type, ui::LayerAnimationObserver* observer) { ui::LayerAnimator* animator = window->layer()->GetAnimator(); @@ -604,11 +604,11 @@ void SessionStateAnimator::RunAnimationForWindow( break; case ANIMATION_GRAYSCALE_BRIGHTNESS: StartGrayscaleBrightnessAnimationForWindow( - window, 1.0, duration, ui::Tween::EASE_IN, observer); + window, 1.0, duration, gfx::Tween::EASE_IN, observer); break; case ANIMATION_UNDO_GRAYSCALE_BRIGHTNESS: StartGrayscaleBrightnessAnimationForWindow( - window, 0.0, duration, ui::Tween::EASE_IN_OUT, observer); + window, 0.0, duration, gfx::Tween::EASE_IN_OUT, observer); break; } } diff --git a/ash/wm/system_gesture_event_filter.h b/ash/wm/system_gesture_event_filter.h index a2a5c73..303751b 100644 --- a/ash/wm/system_gesture_event_filter.h +++ b/ash/wm/system_gesture_event_filter.h @@ -9,8 +9,6 @@ #include "ash/touch/touch_uma.h" #include "base/timer/timer.h" #include "ui/aura/window_observer.h" -#include "ui/base/animation/animation_delegate.h" -#include "ui/base/animation/linear_animation.h" #include "ui/base/events/event_handler.h" #include "ui/gfx/point.h" diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc index 73deafd..ffbe007 100644 --- a/ash/wm/window_animations.cc +++ b/ash/wm/window_animations.cc @@ -60,7 +60,7 @@ const float kWindowAnimation_ShowOpacity = 1.f; const float kWindowAnimation_MinimizeRotate = 0.f; // Tween type when cross fading a workspace window. -const ui::Tween::Type kCrossFadeTweenType = ui::Tween::EASE_IN_OUT; +const gfx::Tween::Type kCrossFadeTweenType = gfx::Tween::EASE_IN_OUT; // Scales for AshWindow above/below current workspace. const float kLayerScaleAboveSize = 1.1f; @@ -116,7 +116,7 @@ void AddLayerAnimationsForMinimize(aura::Window* window, bool show) { rotation_about_pivot.release(), duration)); transition->set_tween_type( - show ? ui::Tween::EASE_IN : ui::Tween::EASE_IN_OUT); + show ? gfx::Tween::EASE_IN : gfx::Tween::EASE_IN_OUT); window->layer()->GetAnimator()->ScheduleAnimation( new ui::LayerAnimationSequence(transition.release())); @@ -318,7 +318,7 @@ class CrossFadeObserver : public ui::CompositorObserver, // animating. Returns the duration of the fade. base::TimeDelta CrossFadeImpl(aura::Window* window, ui::Layer* old_layer, - ui::Tween::Type tween_type) { + gfx::Tween::Type tween_type) { const gfx::Rect old_bounds(old_layer->bounds()); const gfx::Rect new_bounds(window->bounds()); const bool old_on_top = (old_bounds.width() > new_bounds.width()); @@ -413,7 +413,7 @@ void CrossFadeToBounds(aura::Window* window, const gfx::Rect& new_bounds) { else old_layer->parent()->StackAbove(new_layer, old_layer); - CrossFadeImpl(window, old_layer, ui::Tween::EASE_OUT); + CrossFadeImpl(window, old_layer, gfx::Tween::EASE_OUT); } void CrossFadeWindowBetweenWorkspaces(aura::Window* new_workspace, @@ -473,7 +473,7 @@ bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, bool visible) { std::vector<ui::LayerAnimationSequence*> CreateBrightnessGrayscaleAnimationSequence(float target_value, base::TimeDelta duration) { - ui::Tween::Type animation_type = ui::Tween::EASE_OUT; + gfx::Tween::Type animation_type = gfx::Tween::EASE_OUT; scoped_ptr<ui::LayerAnimationSequence> brightness_sequence( new ui::LayerAnimationSequence()); scoped_ptr<ui::LayerAnimationSequence> grayscale_sequence( diff --git a/ash/wm/window_animations_unittest.cc b/ash/wm/window_animations_unittest.cc index d5680cc..c2ea1f6 100644 --- a/ash/wm/window_animations_unittest.cc +++ b/ash/wm/window_animations_unittest.cc @@ -10,10 +10,10 @@ #include "base/time/time.h" #include "ui/aura/test/test_windows.h" #include "ui/aura/window.h" -#include "ui/base/animation/animation_container_element.h" #include "ui/compositor/layer.h" #include "ui/compositor/layer_animator.h" #include "ui/compositor/scoped_animation_duration_scale_mode.h" +#include "ui/gfx/animation/animation_container_element.h" using aura::Window; using ui::Layer; @@ -57,8 +57,8 @@ TEST_F(WindowAnimationsTest, HideShowBrightnessGrayscaleAnimation) { EXPECT_TRUE(window->layer()->visible()); // Stays shown. - ui::AnimationContainerElement* element = - static_cast<ui::AnimationContainerElement*>( + gfx::AnimationContainerElement* element = + static_cast<gfx::AnimationContainerElement*>( window->layer()->GetAnimator()); element->Step(base::TimeTicks::Now() + base::TimeDelta::FromSeconds(5)); @@ -106,9 +106,9 @@ TEST_F(WindowAnimationsTest, CrossFadeToBounds) { EXPECT_EQ(gfx::Transform(), window->layer()->GetTargetTransform()); // Run the animations to completion. - static_cast<ui::AnimationContainerElement*>(old_layer->GetAnimator())->Step( + static_cast<gfx::AnimationContainerElement*>(old_layer->GetAnimator())->Step( base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1)); - static_cast<ui::AnimationContainerElement*>(window->layer()->GetAnimator())-> + static_cast<gfx::AnimationContainerElement*>(window->layer()->GetAnimator())-> Step(base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1)); // Cross fade to a smaller size, as in a restore animation. @@ -127,9 +127,9 @@ TEST_F(WindowAnimationsTest, CrossFadeToBounds) { EXPECT_EQ(1.0f, window->layer()->GetTargetOpacity()); EXPECT_EQ(gfx::Transform(), window->layer()->GetTargetTransform()); - static_cast<ui::AnimationContainerElement*>(old_layer->GetAnimator())->Step( + static_cast<gfx::AnimationContainerElement*>(old_layer->GetAnimator())->Step( base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1)); - static_cast<ui::AnimationContainerElement*>(window->layer()->GetAnimator())-> + static_cast<gfx::AnimationContainerElement*>(window->layer()->GetAnimator())-> Step(base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1)); } diff --git a/ash/wm/workspace/alternate_frame_caption_button.cc b/ash/wm/workspace/alternate_frame_caption_button.cc index ffdb539..578e46a6 100644 --- a/ash/wm/workspace/alternate_frame_caption_button.cc +++ b/ash/wm/workspace/alternate_frame_caption_button.cc @@ -4,7 +4,7 @@ #include "ash/wm/workspace/alternate_frame_caption_button.h" -#include "ui/base/animation/slide_animation.h" +#include "ui/gfx/animation/slide_animation.h" #include "ui/gfx/canvas.h" namespace ash { @@ -96,7 +96,7 @@ AlternateFrameCaptionButton::AlternateFrameCaptionButton( action_(action), hidden_bubble_radius_(0), shown_bubble_radius_(0), - bubble_animation_(new ui::SlideAnimation(this)) { + bubble_animation_(new gfx::SlideAnimation(this)) { } AlternateFrameCaptionButton::~AlternateFrameCaptionButton() { @@ -216,12 +216,12 @@ void AlternateFrameCaptionButton::StateChanged() { } void AlternateFrameCaptionButton::AnimationProgressed( - const ui::Animation* animation) { + const gfx::Animation* animation) { SchedulePaint(); } void AlternateFrameCaptionButton::AnimationEnded( - const ui::Animation* animation) { + const gfx::Animation* animation) { // The bubble animation was postponed if the button became pressed when the // bubble was fading out. Do the animation now. MaybeStartNewBubbleAnimation(); diff --git a/ash/wm/workspace/alternate_frame_caption_button.h b/ash/wm/workspace/alternate_frame_caption_button.h index b0f9581..7f5e28f 100644 --- a/ash/wm/workspace/alternate_frame_caption_button.h +++ b/ash/wm/workspace/alternate_frame_caption_button.h @@ -9,7 +9,7 @@ #include "base/memory/scoped_ptr.h" #include "ui/views/controls/button/custom_button.h" -namespace ui { +namespace gfx { class SlideAnimation; } @@ -47,9 +47,9 @@ class ASH_EXPORT AlternateFrameCaptionButton : public views::CustomButton { virtual void StateChanged() OVERRIDE; // ui::AnimateDelegate overrides. (views::CustomButton inherits from - // ui::AnimationDelegate). - virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; - virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; + // gfx::AnimationDelegate). + virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; + virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE; Action action_; @@ -59,7 +59,7 @@ class ASH_EXPORT AlternateFrameCaptionButton : public views::CustomButton { // The radius of the background bubble when it is visible. double shown_bubble_radius_; - scoped_ptr<ui::SlideAnimation> bubble_animation_; + scoped_ptr<gfx::SlideAnimation> bubble_animation_; DISALLOW_COPY_AND_ASSIGN(AlternateFrameCaptionButton); }; diff --git a/ash/wm/workspace/desktop_background_fade_controller.cc b/ash/wm/workspace/desktop_background_fade_controller.cc index 563d07b..abbdf57 100644 --- a/ash/wm/workspace/desktop_background_fade_controller.cc +++ b/ash/wm/workspace/desktop_background_fade_controller.cc @@ -20,15 +20,15 @@ DesktopBackgroundFadeController::DesktopBackgroundFadeController( base::TimeDelta duration, Direction direction) { SkColor start_color, target_color; - ui::Tween::Type tween_type; + gfx::Tween::Type tween_type; if (direction == FADE_OUT) { start_color = SkColorSetARGB(0, 0, 0, 0); target_color = SK_ColorBLACK; - tween_type = ui::Tween::EASE_IN_OUT; + tween_type = gfx::Tween::EASE_IN_OUT; } else { start_color = SK_ColorBLACK; target_color = SkColorSetARGB(0, 0, 0, 0); - tween_type = ui::Tween::EASE_IN_OUT; + tween_type = gfx::Tween::EASE_IN_OUT; } window_controller_.reset( diff --git a/ash/wm/workspace/phantom_window_controller.cc b/ash/wm/workspace/phantom_window_controller.cc index 67272c1..cd2865e 100644 --- a/ash/wm/workspace/phantom_window_controller.cc +++ b/ash/wm/workspace/phantom_window_controller.cc @@ -10,9 +10,9 @@ #include "third_party/skia/include/core/SkCanvas.h" #include "ui/aura/root_window.h" #include "ui/aura/window.h" -#include "ui/base/animation/slide_animation.h" #include "ui/compositor/layer.h" #include "ui/compositor/scoped_layer_animation_settings.h" +#include "ui/gfx/animation/slide_animation.h" #include "ui/gfx/canvas.h" #include "ui/gfx/skia_util.h" #include "ui/views/painter.h" @@ -142,8 +142,8 @@ void PhantomWindowController::Show(const gfx::Rect& bounds_in_screen) { if (!phantom_widget_start_ && start_root != target_root) phantom_widget_start_ = CreatePhantomWidget(start_root, start_bounds_); - animation_.reset(new ui::SlideAnimation(this)); - animation_->SetTweenType(ui::Tween::EASE_IN); + animation_.reset(new gfx::SlideAnimation(this)); + animation_->SetTweenType(gfx::Tween::EASE_IN); const int kAnimationDurationMS = 200; animation_->SetSlideDuration(kAnimationDurationMS); animation_->Show(); @@ -163,7 +163,7 @@ bool PhantomWindowController::IsShowing() const { } void PhantomWindowController::AnimationProgressed( - const ui::Animation* animation) { + const gfx::Animation* animation) { const gfx::Rect current_bounds = animation->CurrentValueBetween(start_bounds_, bounds_in_screen_); if (phantom_widget_start_) diff --git a/ash/wm/workspace/phantom_window_controller.h b/ash/wm/workspace/phantom_window_controller.h index 5cd40da..4a92792 100644 --- a/ash/wm/workspace/phantom_window_controller.h +++ b/ash/wm/workspace/phantom_window_controller.h @@ -9,7 +9,7 @@ #include "base/basictypes.h" #include "base/gtest_prod_util.h" #include "base/memory/scoped_ptr.h" -#include "ui/base/animation/animation_delegate.h" +#include "ui/gfx/animation/animation_delegate.h" #include "ui/gfx/rect.h" namespace aura { @@ -17,7 +17,7 @@ class RootWindow; class Window; } -namespace ui { +namespace gfx { class SlideAnimation; } @@ -30,7 +30,7 @@ namespace internal { // PhantomWindowController is responsible for showing a phantom representation // of a window. It's used used during dragging a window to show a snap location. -class ASH_EXPORT PhantomWindowController : public ui::AnimationDelegate { +class ASH_EXPORT PhantomWindowController : public gfx::AnimationDelegate { public: explicit PhantomWindowController(aura::Window* window); virtual ~PhantomWindowController(); @@ -57,8 +57,8 @@ class ASH_EXPORT PhantomWindowController : public ui::AnimationDelegate { phantom_below_window_ = phantom_below_window; } - // ui::AnimationDelegate overrides: - virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; + // gfx::AnimationDelegate overrides: + virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; private: FRIEND_TEST_ALL_PREFIXES(WorkspaceWindowResizerTest, PhantomWindowShow); @@ -93,7 +93,7 @@ class ASH_EXPORT PhantomWindowController : public ui::AnimationDelegate { views::Widget* phantom_widget_start_; // Used to transition the bounds. - scoped_ptr<ui::SlideAnimation> animation_; + scoped_ptr<gfx::SlideAnimation> animation_; DISALLOW_COPY_AND_ASSIGN(PhantomWindowController); }; diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc index 62eb380..5f096d0 100644 --- a/ash/wm/workspace/workspace_window_resizer_unittest.cc +++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc @@ -31,9 +31,10 @@ #include "ui/gfx/screen.h" #include "ui/views/widget/widget.h" -namespace ui { +namespace gfx { // Class to provide access to SlideAnimation internals for testing. +// TODO: this should be next to SlideAnimation, not here. class SlideAnimation::TestApi { public: explicit TestApi(SlideAnimation* animation) : animation_(animation) {} @@ -202,8 +203,8 @@ class WorkspaceWindowResizerTest : public test::AshTestBase { } // Simulate running the animation. - void RunAnimationTillComplete(ui::SlideAnimation* animation) { - ui::SlideAnimation::TestApi test_api(animation); + void RunAnimationTillComplete(gfx::SlideAnimation* animation) { + gfx::SlideAnimation::TestApi test_api(animation); test_api.RunTillComplete(); } diff --git a/ash/wm/workspace_controller.cc b/ash/wm/workspace_controller.cc index 64e69e2..8e63d34 100644 --- a/ash/wm/workspace_controller.cc +++ b/ash/wm/workspace_controller.cc @@ -116,7 +116,7 @@ void WorkspaceController::DoInitialAnimation() { ui::LayerAnimationElement::VISIBILITY, -1); - settings.SetTweenType(ui::Tween::EASE_OUT); + settings.SetTweenType(gfx::Tween::EASE_OUT); settings.SetTransitionDuration( base::TimeDelta::FromMilliseconds(kCrossFadeDurationMS)); viewport_->layer()->SetTransform(gfx::Transform()); |