Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / compositor / float_animation_curve_adapter.h
blobdc665d4bcf2b506ee34f88d229439ffef1802175
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"
12 namespace ui {
14 class FloatAnimationCurveAdapter : public cc::FloatAnimationCurve {
15 public:
16 FloatAnimationCurveAdapter(gfx::Tween::Type tween_type,
17 float initial_value,
18 float target_value,
19 base::TimeDelta duration);
21 ~FloatAnimationCurveAdapter() override {}
23 // FloatAnimationCurve implementation.
24 base::TimeDelta Duration() const override;
25 scoped_ptr<cc::AnimationCurve> Clone() const override;
26 float GetValue(base::TimeDelta t) const override;
28 private:
29 gfx::Tween::Type tween_type_;
30 float initial_value_;
31 float target_value_;
32 base::TimeDelta duration_;
35 } // namespace ui
37 #endif // UI_COMPOSITOR_FLOAT_ANIMATION_CURVE_ADAPTER_H_