OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 InterpolableValue_h | 5 #ifndef InterpolableValue_h |
6 #define InterpolableValue_h | 6 #define InterpolableValue_h |
7 | 7 |
8 #include "core/animation/AnimatableValue.h" | 8 #include "core/animation/AnimatableValue.h" |
9 #include "wtf/OwnPtr.h" | 9 #include "wtf/OwnPtr.h" |
10 #include "wtf/PassOwnPtr.h" | 10 #include "wtf/PassOwnPtr.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 virtual bool isAnimatableValue() const { return false; } | 21 virtual bool isAnimatableValue() const { return false; } |
22 | 22 |
23 virtual PassOwnPtrWillBeRawPtr<InterpolableValue> clone() const = 0; | 23 virtual PassOwnPtrWillBeRawPtr<InterpolableValue> clone() const = 0; |
24 | 24 |
25 virtual void trace(Visitor*) { } | 25 virtual void trace(Visitor*) { } |
26 | 26 |
27 private: | 27 private: |
28 virtual PassOwnPtrWillBeRawPtr<InterpolableValue> interpolate(const Interpol
ableValue &to, const double progress) const = 0; | 28 virtual PassOwnPtrWillBeRawPtr<InterpolableValue> interpolate(const Interpol
ableValue &to, const double progress) const = 0; |
29 | 29 |
30 friend class Interpolation; | 30 friend class Interpolation; |
| 31 friend class LegacyStyleInterpolation; |
31 | 32 |
32 // Keep interpolate private, but allow calls within the hierarchy without | 33 // Keep interpolate private, but allow calls within the hierarchy without |
33 // knowledge of type. | 34 // knowledge of type. |
34 friend class InterpolableNumber; | 35 friend class InterpolableNumber; |
35 friend class InterpolableBool; | 36 friend class InterpolableBool; |
36 friend class InterpolableList; | 37 friend class InterpolableList; |
37 }; | 38 }; |
38 | 39 |
39 class InterpolableNumber : public InterpolableValue { | 40 class InterpolableNumber : public InterpolableValue { |
40 public: | 41 public: |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 }; | 158 }; |
158 | 159 |
159 DEFINE_TYPE_CASTS(InterpolableNumber, InterpolableValue, value, value->isNumber(
), value.isNumber()); | 160 DEFINE_TYPE_CASTS(InterpolableNumber, InterpolableValue, value, value->isNumber(
), value.isNumber()); |
160 DEFINE_TYPE_CASTS(InterpolableBool, InterpolableValue, value, value->isBool(), v
alue.isBool()); | 161 DEFINE_TYPE_CASTS(InterpolableBool, InterpolableValue, value, value->isBool(), v
alue.isBool()); |
161 DEFINE_TYPE_CASTS(InterpolableList, InterpolableValue, value, value->isList(), v
alue.isList()); | 162 DEFINE_TYPE_CASTS(InterpolableList, InterpolableValue, value, value->isList(), v
alue.isList()); |
162 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, InterpolableValue, value, value->
isAnimatableValue(), value.isAnimatableValue()); | 163 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, InterpolableValue, value, value->
isAnimatableValue(), value.isAnimatableValue()); |
163 | 164 |
164 } | 165 } |
165 | 166 |
166 #endif | 167 #endif |
OLD | NEW |