OLD | NEW |
| (Empty) |
1 // Copyright 2017 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. | |
4 | |
5 #ifndef AnimatableFontVariationSettings_h | |
6 #define AnimatableFontVariationSettings_h | |
7 | |
8 #include "core/animation/animatable/AnimatableValue.h" | |
9 | |
10 #include "platform/fonts/opentype/FontSettings.h" | |
11 | |
12 namespace blink { | |
13 | |
14 class AnimatableFontVariationSettings final : public AnimatableValue { | |
15 public: | |
16 ~AnimatableFontVariationSettings() override {} | |
17 static PassRefPtr<AnimatableFontVariationSettings> Create( | |
18 PassRefPtr<FontVariationSettings> settings) { | |
19 return AdoptRef(new AnimatableFontVariationSettings(std::move(settings))); | |
20 } | |
21 | |
22 private: | |
23 explicit AnimatableFontVariationSettings( | |
24 PassRefPtr<FontVariationSettings> settings) | |
25 : settings_(std::move(settings)) {} | |
26 AnimatableType GetType() const override { return kTypeFontVariationSettings; } | |
27 bool EqualTo(const AnimatableValue* other) const final; | |
28 | |
29 const RefPtr<FontVariationSettings> settings_; | |
30 }; | |
31 | |
32 DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableFontVariationSettings, | |
33 IsFontVariationSettings()); | |
34 | |
35 } // namespace blink | |
36 | |
37 #endif // AnimatableFontVariationSettings_h | |
OLD | NEW |