diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-15 17:29:30 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-15 17:29:30 +0000 |
commit | ffb15d1eb8fc4180b30b43865fc44427f29cd578 (patch) | |
tree | ea89569dc78f3a5a103dfb7eef8a4b5bc8879268 /ash/wm/workspace | |
parent | 70cdf8d473698e4f9203dde64bfa9147dc4d70e7 (diff) | |
download | chromium_src-ffb15d1eb8fc4180b30b43865fc44427f29cd578.zip chromium_src-ffb15d1eb8fc4180b30b43865fc44427f29cd578.tar.gz chromium_src-ffb15d1eb8fc4180b30b43865fc44427f29cd578.tar.bz2 |
ui/base/animation -> ui/gfx/animation
I also made GFX_EXPORT real, which is ok since it's the same as
UI_EXPORT. It'll only matter when we separate out at gyp level.
BUG=none
TEST=none
R=ben@chromium.org
Review URL: https://codereview.chromium.org/23531053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223289 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/workspace')
6 files changed, 26 insertions, 25 deletions
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(); } |