GoogleURLTrackerInfoBarDelegate: Initialize uninitialized member in constructor.
[chromium-blink-merge.git] / cc / animation / scroll_offset_animation_curve.h
blob543ae373f94edd6d3563b27c416de90c2044e07c
1 // Copyright 2013 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 CC_ANIMATION_SCROLL_OFFSET_ANIMATION_CURVE_H_
6 #define CC_ANIMATION_SCROLL_OFFSET_ANIMATION_CURVE_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "base/time/time.h"
10 #include "cc/animation/animation_curve.h"
11 #include "cc/base/cc_export.h"
13 namespace cc {
15 class TimingFunction;
17 class CC_EXPORT ScrollOffsetAnimationCurve : public AnimationCurve {
18 public:
19 static scoped_ptr<ScrollOffsetAnimationCurve> Create(
20 const gfx::Vector2dF& target_value,
21 scoped_ptr<TimingFunction> timing_function);
23 virtual ~ScrollOffsetAnimationCurve();
25 void SetInitialValue(const gfx::Vector2dF& initial_value);
26 gfx::Vector2dF GetValue(double t) const;
28 // AnimationCurve implementation
29 virtual double Duration() const OVERRIDE;
30 virtual CurveType Type() const OVERRIDE;
31 virtual scoped_ptr<AnimationCurve> Clone() const OVERRIDE;
33 private:
34 ScrollOffsetAnimationCurve(const gfx::Vector2dF& target_value,
35 scoped_ptr <TimingFunction> timing_function);
37 gfx::Vector2dF initial_value_;
38 gfx::Vector2dF target_value_;
39 base::TimeDelta duration_;
41 scoped_ptr<TimingFunction> timing_function_;
43 DISALLOW_COPY_AND_ASSIGN(ScrollOffsetAnimationCurve);
46 } // namespace cc
48 #endif // CC_ANIMATION_SCROLL_OFFSET_ANIMATION_CURVE_H_