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 PlatformGestureCurve_h | 5 #ifndef PlatformGestureCurve_h |
6 #define PlatformGestureCurve_h | 6 #define PlatformGestureCurve_h |
7 | 7 |
8 namespace WebCore { | 8 namespace WebCore { |
9 | 9 |
10 class PlatformGestureCurveTarget; | 10 class PlatformGestureCurveTarget; |
11 | 11 |
12 // Abstract interface for curves used by ActivePlatformGestureAnimation. A | 12 // Abstract interface for curves used by ActivePlatformGestureAnimation. A |
13 // PlatformGestureCurve defines the animation parameters as a function of time | 13 // PlatformGestureCurve defines the animation parameters as a function of time |
14 // (zero-based), and applies the parameters directly to the target of the | 14 // (zero-based), and applies the parameters directly to the target of the |
15 // animation. | 15 // animation. |
16 class PlatformGestureCurve { | 16 class PlatformGestureCurve { |
17 public: | 17 public: |
18 virtual ~PlatformGestureCurve() { } | 18 virtual ~PlatformGestureCurve() { } |
19 | 19 |
20 // Returns a name of the curve for use in debugging. | 20 // Returns a name of the curve for use in debugging. |
21 virtual const char* debugName() const = 0; | 21 virtual const char* debugName() const = 0; |
22 | 22 |
23 // Returns false if curve has finished and can no longer be applied. | 23 // Returns false if curve has finished and can no longer be applied. |
24 virtual bool apply(double time, PlatformGestureCurveTarget*) = 0; | 24 virtual bool apply(double time, PlatformGestureCurveTarget*) = 0; |
25 }; | 25 }; |
26 | 26 |
27 } // namespace WebCore | 27 } // namespace WebCore |
28 | 28 |
29 #endif | 29 #endif |
OLD | NEW |