OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WebFloatAnimationCurveImpl_h | 5 #ifndef WebFloatAnimationCurveImpl_h |
6 #define WebFloatAnimationCurveImpl_h | 6 #define WebFloatAnimationCurveImpl_h |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatAnimationCu
rve.h" | 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatAnimationCu
rve.h" |
10 #include "webkit/compositor_bindings/webkit_compositor_bindings_export.h" | 10 #include "webkit/compositor_bindings/webkit_compositor_bindings_export.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 class AnimationCurve; | 13 class AnimationCurve; |
14 class KeyframedFloatAnimationCurve; | 14 class KeyframedFloatAnimationCurve; |
15 } | 15 } |
16 | 16 |
17 namespace WebKit { | 17 namespace WebKit { |
| 18 struct WebFloatKeyframe; |
18 | 19 |
19 class WebFloatAnimationCurveImpl : public WebFloatAnimationCurve { | 20 class WebFloatAnimationCurveImpl : public WebFloatAnimationCurve { |
20 public: | 21 public: |
21 WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebFloatAnimationCurveImpl(); | 22 WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebFloatAnimationCurveImpl(); |
22 virtual ~WebFloatAnimationCurveImpl(); | 23 virtual ~WebFloatAnimationCurveImpl(); |
23 | 24 |
24 // WebAnimationCurve implementation. | 25 // WebAnimationCurve implementation. |
25 virtual AnimationCurveType type() const OVERRIDE; | 26 virtual AnimationCurveType type() const; |
26 | 27 |
27 // WebFloatAnimationCurve implementation. | 28 // WebFloatAnimationCurve implementation. |
28 virtual void add(const WebFloatKeyframe&) OVERRIDE; | 29 virtual void add(const WebFloatKeyframe&); |
29 virtual void add(const WebFloatKeyframe&, TimingFunctionType) OVERRIDE; | 30 virtual void add(const WebFloatKeyframe&, TimingFunctionType); |
30 virtual void add(const WebFloatKeyframe&, | 31 virtual void add(const WebFloatKeyframe&, |
31 double x1, | 32 double x1, |
32 double y1, | 33 double y1, |
33 double x2, | 34 double x2, |
34 double y2) OVERRIDE; | 35 double y2); |
35 | 36 |
36 virtual float getValue(double time) const OVERRIDE; | 37 virtual float getValue(double time) const; |
37 | 38 |
38 scoped_ptr<cc::AnimationCurve> cloneToAnimationCurve() const; | 39 scoped_ptr<cc::AnimationCurve> cloneToAnimationCurve() const; |
39 | 40 |
40 private: | 41 private: |
41 scoped_ptr<cc::KeyframedFloatAnimationCurve> curve_; | 42 scoped_ptr<cc::KeyframedFloatAnimationCurve> curve_; |
42 }; | 43 }; |
43 | 44 |
44 } | 45 } |
45 | 46 |
46 #endif // WebFloatAnimationCurveImpl_h | 47 #endif // WebFloatAnimationCurveImpl_h |
OLD | NEW |