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

Unified Diff: ui/views/animation/scroll_animator.cc

Issue 23531053: ui/base/animation -> ui/gfx/animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge 2 trunk Created 7 years, 3 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 | « ui/views/animation/scroll_animator.h ('k') | ui/views/bubble/bubble_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/scroll_animator.cc
diff --git a/ui/views/animation/scroll_animator.cc b/ui/views/animation/scroll_animator.cc
index 1e484a37c80b3f4f5d52bbc9fdd500ed7a01b1f9..7d689993f2b236027f9496a3d5e576fde3c32a51 100644
--- a/ui/views/animation/scroll_animator.cc
+++ b/ui/views/animation/scroll_animator.cc
@@ -8,7 +8,7 @@
#include <cmath>
#include "base/logging.h"
-#include "ui/base/animation/slide_animation.h"
+#include "ui/gfx/animation/slide_animation.h"
namespace {
const float kDefaultAcceleration = -1500.0f; // in pixels per second^2
@@ -51,7 +51,7 @@ void ScrollAnimator::Start(float velocity_x, float velocity_y) {
velocity_x_ = velocity_x;
velocity_y_ = velocity_y;
duration_ = -v / acceleration_; // in seconds
- animation_.reset(new ui::SlideAnimation(this));
+ animation_.reset(new gfx::SlideAnimation(this));
animation_->SetSlideDuration(static_cast<int>(duration_ * 1000));
animation_->Show();
}
@@ -61,11 +61,11 @@ void ScrollAnimator::Stop() {
animation_.reset();
}
-void ScrollAnimator::AnimationEnded(const ui::Animation* animation) {
+void ScrollAnimator::AnimationEnded(const gfx::Animation* animation) {
Stop();
}
-void ScrollAnimator::AnimationProgressed(const ui::Animation* animation) {
+void ScrollAnimator::AnimationProgressed(const gfx::Animation* animation) {
float t = static_cast<float>(animation->GetCurrentValue()) * duration_;
float a_x = velocity_x_ > 0 ? acceleration_ : -acceleration_;
float a_y = velocity_y_ > 0 ? acceleration_ : -acceleration_;
@@ -75,7 +75,7 @@ void ScrollAnimator::AnimationProgressed(const ui::Animation* animation) {
delegate_->OnScroll(dx, dy);
}
-void ScrollAnimator::AnimationCanceled(const ui::Animation* animation) {
+void ScrollAnimator::AnimationCanceled(const gfx::Animation* animation) {
Stop();
}
« no previous file with comments | « ui/views/animation/scroll_animator.h ('k') | ui/views/bubble/bubble_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698