summaryrefslogtreecommitdiffstats
path: root/cc/test/animation_test_common.h
diff options
context:
space:
mode:
authorshawnsingh@chromium.org <shawnsingh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-21 20:12:50 +0000
committershawnsingh@chromium.org <shawnsingh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-21 20:12:50 +0000
commitcccb13dbf6a113811ae68c96c30b65491dd9427d (patch)
tree1305c61c5eab1814e28a8fe3650f802474edfb2a /cc/test/animation_test_common.h
parent28424cc867e606e184195a21cddc7672cfc3ed74 (diff)
downloadchromium_src-cccb13dbf6a113811ae68c96c30b65491dd9427d.zip
chromium_src-cccb13dbf6a113811ae68c96c30b65491dd9427d.tar.gz
chromium_src-cccb13dbf6a113811ae68c96c30b65491dd9427d.tar.bz2
cc: Chromify animation_test_common
NOTRY=true Review URL: https://chromiumcodereview.appspot.com/12854010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189681 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/animation_test_common.h')
-rw-r--r--cc/test/animation_test_common.h130
1 files changed, 77 insertions, 53 deletions
diff --git a/cc/test/animation_test_common.h b/cc/test/animation_test_common.h
index c4bbe15..8cb4d9a 100644
--- a/cc/test/animation_test_common.h
+++ b/cc/test/animation_test_common.h
@@ -17,76 +17,100 @@ class Layer;
namespace cc {
-class FakeFloatAnimationCurve : public cc::FloatAnimationCurve {
-public:
- FakeFloatAnimationCurve();
- explicit FakeFloatAnimationCurve(double duration);
- virtual ~FakeFloatAnimationCurve();
-
- virtual double Duration() const OVERRIDE;
- virtual float GetValue(double now) const OVERRIDE;
- virtual scoped_ptr<cc::AnimationCurve> Clone() const OVERRIDE;
-
-private:
- double m_duration;
+class FakeFloatAnimationCurve : public FloatAnimationCurve {
+ public:
+ FakeFloatAnimationCurve();
+ explicit FakeFloatAnimationCurve(double duration);
+ virtual ~FakeFloatAnimationCurve();
+
+ virtual double Duration() const OVERRIDE;
+ virtual float GetValue(double now) const OVERRIDE;
+ virtual scoped_ptr<AnimationCurve> Clone() const OVERRIDE;
+
+ private:
+ double duration_;
};
-class FakeTransformTransition : public cc::TransformAnimationCurve {
-public:
- FakeTransformTransition(double duration);
- virtual ~FakeTransformTransition();
+class FakeTransformTransition : public TransformAnimationCurve {
+ public:
+ FakeTransformTransition(double duration);
+ virtual ~FakeTransformTransition();
- virtual double Duration() const OVERRIDE;
- virtual gfx::Transform GetValue(double time) const OVERRIDE;
+ virtual double Duration() const OVERRIDE;
+ virtual gfx::Transform GetValue(double time) const OVERRIDE;
- virtual scoped_ptr<cc::AnimationCurve> Clone() const OVERRIDE;
+ virtual scoped_ptr<AnimationCurve> Clone() const OVERRIDE;
-private:
- double m_duration;
+ private:
+ double duration_;
};
-class FakeFloatTransition : public cc::FloatAnimationCurve {
-public:
- FakeFloatTransition(double duration, float from, float to);
- virtual ~FakeFloatTransition();
+class FakeFloatTransition : public FloatAnimationCurve {
+ public:
+ FakeFloatTransition(double duration, float from, float to);
+ virtual ~FakeFloatTransition();
- virtual double Duration() const OVERRIDE;
- virtual float GetValue(double time) const OVERRIDE;
+ virtual double Duration() const OVERRIDE;
+ virtual float GetValue(double time) const OVERRIDE;
- virtual scoped_ptr<cc::AnimationCurve> Clone() const OVERRIDE;
+ virtual scoped_ptr<AnimationCurve> Clone() const OVERRIDE;
-private:
- double m_duration;
- float m_from;
- float m_to;
+ private:
+ double duration_;
+ float from_;
+ float to_;
};
-class FakeLayerAnimationValueObserver : public cc::LayerAnimationValueObserver {
-public:
- FakeLayerAnimationValueObserver();
- virtual ~FakeLayerAnimationValueObserver();
+class FakeLayerAnimationValueObserver : public LayerAnimationValueObserver {
+ public:
+ FakeLayerAnimationValueObserver();
+ virtual ~FakeLayerAnimationValueObserver();
- // LayerAnimationValueObserver implementation
- virtual void OnOpacityAnimated(float) OVERRIDE;
- virtual void OnTransformAnimated(const gfx::Transform&) OVERRIDE;
- virtual bool IsActive() const OVERRIDE;
+ // LayerAnimationValueObserver implementation
+ virtual void OnOpacityAnimated(float opacity) OVERRIDE;
+ virtual void OnTransformAnimated(const gfx::Transform& transform) OVERRIDE;
+ virtual bool IsActive() const OVERRIDE;
- float opacity() const { return m_opacity; }
- const gfx::Transform& transform() const { return m_transform; }
+ float opacity() const { return opacity_; }
+ const gfx::Transform& transform() const { return transform_; }
-private:
- float m_opacity;
- gfx::Transform m_transform;
+ private:
+ float opacity_;
+ gfx::Transform transform_;
};
-int addOpacityTransitionToController(cc::LayerAnimationController&, double duration, float startOpacity, float endOpacity, bool useTimingFunction);
-int addAnimatedTransformToController(cc::LayerAnimationController&, double duration, int deltaX, int deltaY);
-
-int addOpacityTransitionToLayer(cc::Layer&, double duration, float startOpacity, float endOpacity, bool useTimingFunction);
-int addOpacityTransitionToLayer(cc::LayerImpl&, double duration, float startOpacity, float endOpacity, bool useTimingFunction);
-
-int addAnimatedTransformToLayer(cc::Layer&, double duration, int deltaX, int deltaY);
-int addAnimatedTransformToLayer(cc::LayerImpl&, double duration, int deltaX, int deltaY);
+int AddOpacityTransitionToController(LayerAnimationController* controller,
+ double duration,
+ float start_opacity,
+ float end_opacity,
+ bool use_timing_function);
+
+int AddAnimatedTransformToController(LayerAnimationController* controller,
+ double duration,
+ int delta_x,
+ int delta_y);
+
+int AddOpacityTransitionToLayer(Layer* layer,
+ double duration,
+ float start_opacity,
+ float end_opacity,
+ bool use_timing_function);
+
+int AddOpacityTransitionToLayer(LayerImpl* layer,
+ double duration,
+ float start_opacity,
+ float end_opacity,
+ bool use_timing_function);
+
+int AddAnimatedTransformToLayer(Layer* layer,
+ double duration,
+ int delta_x,
+ int delta_y);
+
+int AddAnimatedTransformToLayer(LayerImpl* layer,
+ double duration,
+ int delta_x,
+ int delta_y);
} // namespace cc