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/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/animation/animatable/AnimatableValue.h" | 9 #include "core/animation/animatable/AnimatableValue.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
11 #include "wtf/OwnPtr.h" | 11 #include "wtf/OwnPtr.h" |
12 #include "wtf/PassOwnPtr.h" | 12 #include "wtf/PassOwnPtr.h" |
13 #include "wtf/Vector.h" | 13 #include "wtf/Vector.h" |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 class CORE_EXPORT InterpolableValue : public NoBaseWillBeGarbageCollected<Interp
olableValue> { | 17 class CORE_EXPORT InterpolableValue : public NoBaseWillBeGarbageCollected<Interp
olableValue> { |
18 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(InterpolableValue); | 18 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(InterpolableValue); |
| 19 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(InterpolableValue); |
19 public: | 20 public: |
20 virtual bool isNumber() const { return false; } | 21 virtual bool isNumber() const { return false; } |
21 virtual bool isBool() const { return false; } | 22 virtual bool isBool() const { return false; } |
22 virtual bool isList() const { return false; } | 23 virtual bool isList() const { return false; } |
23 virtual bool isAnimatableValue() const { return false; } | 24 virtual bool isAnimatableValue() const { return false; } |
24 | 25 |
25 virtual PassOwnPtrWillBeRawPtr<InterpolableValue> clone() const = 0; | 26 virtual PassOwnPtrWillBeRawPtr<InterpolableValue> clone() const = 0; |
26 | 27 |
27 DEFINE_INLINE_VIRTUAL_TRACE() { } | 28 DEFINE_INLINE_VIRTUAL_TRACE() { } |
28 | 29 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 }; | 179 }; |
179 | 180 |
180 DEFINE_TYPE_CASTS(InterpolableNumber, InterpolableValue, value, value->isNumber(
), value.isNumber()); | 181 DEFINE_TYPE_CASTS(InterpolableNumber, InterpolableValue, value, value->isNumber(
), value.isNumber()); |
181 DEFINE_TYPE_CASTS(InterpolableBool, InterpolableValue, value, value->isBool(), v
alue.isBool()); | 182 DEFINE_TYPE_CASTS(InterpolableBool, InterpolableValue, value, value->isBool(), v
alue.isBool()); |
182 DEFINE_TYPE_CASTS(InterpolableList, InterpolableValue, value, value->isList(), v
alue.isList()); | 183 DEFINE_TYPE_CASTS(InterpolableList, InterpolableValue, value, value->isList(), v
alue.isList()); |
183 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, InterpolableValue, value, value->
isAnimatableValue(), value.isAnimatableValue()); | 184 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, InterpolableValue, value, value->
isAnimatableValue(), value.isAnimatableValue()); |
184 | 185 |
185 } | 186 } |
186 | 187 |
187 #endif | 188 #endif |
OLD | NEW |