Index: cc/animation/keyframed_animation_curve.h |
diff --git a/cc/animation/keyframed_animation_curve.h b/cc/animation/keyframed_animation_curve.h |
index 6e26875467211a71de469ba355f539b59c0324c8..8f76e422d73154d1d638f362350760221bef8558 100644 |
--- a/cc/animation/keyframed_animation_curve.h |
+++ b/cc/animation/keyframed_animation_curve.h |
@@ -153,9 +153,13 @@ class CC_EXPORT KeyframedFloatAnimationCurve : public FloatAnimationCurve { |
~KeyframedFloatAnimationCurve() override; |
void AddKeyframe(std::unique_ptr<FloatKeyframe> keyframe); |
+ |
void SetTimingFunction(std::unique_ptr<TimingFunction> timing_function) { |
timing_function_ = std::move(timing_function); |
} |
+ TimingFunction* timing_function_for_testing() const { |
+ return timing_function_.get(); |
+ } |
// AnimationCurve implementation |
base::TimeDelta Duration() const override; |
@@ -164,12 +168,15 @@ class CC_EXPORT KeyframedFloatAnimationCurve : public FloatAnimationCurve { |
// FloatAnimationCurve implementation |
float GetValue(base::TimeDelta t) const override; |
+ using Keyframes = std::vector<std::unique_ptr<FloatKeyframe>>; |
+ const Keyframes& keyframes_for_testing() const { return keyframes_; } |
+ |
private: |
KeyframedFloatAnimationCurve(); |
// Always sorted in order of increasing time. No two keyframes have the |
// same time. |
- std::vector<std::unique_ptr<FloatKeyframe>> keyframes_; |
+ Keyframes keyframes_; |
std::unique_ptr<TimingFunction> timing_function_; |
DISALLOW_COPY_AND_ASSIGN(KeyframedFloatAnimationCurve); |