1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_COMPOSITOR_FLOAT_ANIMATION_CURVE_ADAPTER_H_
6 #define UI_COMPOSITOR_FLOAT_ANIMATION_CURVE_ADAPTER_H_
8 #include "base/time/time.h"
9 #include "cc/animation/animation_curve.h"
10 #include "ui/gfx/animation/tween.h"
14 class FloatAnimationCurveAdapter
: public cc::FloatAnimationCurve
{
16 FloatAnimationCurveAdapter(gfx::Tween::Type tween_type
,
19 base::TimeDelta duration
);
21 virtual ~FloatAnimationCurveAdapter() { }
23 // FloatAnimationCurve implementation.
24 virtual double Duration() const OVERRIDE
;
25 virtual scoped_ptr
<cc::AnimationCurve
> Clone() const OVERRIDE
;
26 virtual float GetValue(double t
) const OVERRIDE
;
29 gfx::Tween::Type tween_type_
;
32 base::TimeDelta duration_
;
37 #endif // UI_COMPOSITOR_FLOAT_ANIMATION_CURVE_ADAPTER_H_