| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 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 CHROME_BROWSER_ANDROID_VR_SHELL_ANIMATION_H_ | |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_ANIMATION_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "base/macros.h" | |
| 12 #include "base/time/time.h" | |
| 13 | |
| 14 namespace vr_shell { | |
| 15 | |
| 16 namespace easing { | |
| 17 class Easing; | |
| 18 } | |
| 19 | |
| 20 // Describes the characteristics of a transition from an initial set of values | |
| 21 // to a final set, with timing and interpolation information. Other classes use | |
| 22 // this information to animate UI element location, size, and other properties. | |
| 23 class Animation { | |
| 24 public: | |
| 25 enum Property { | |
| 26 SIZE = 0, | |
| 27 TRANSLATION, | |
| 28 SCALE, | |
| 29 ROTATION, | |
| 30 OPACITY, | |
| 31 }; | |
| 32 | |
| 33 Animation(int id, | |
| 34 Property property, | |
| 35 std::unique_ptr<easing::Easing> easing, | |
| 36 std::vector<float> from, | |
| 37 std::vector<float> to, | |
| 38 const base::TimeTicks& start, | |
| 39 const base::TimeDelta& duration); | |
| 40 ~Animation(); | |
| 41 | |
| 42 int id; | |
| 43 Property property; | |
| 44 std::unique_ptr<easing::Easing> easing; | |
| 45 std::vector<float> from; | |
| 46 std::vector<float> to; | |
| 47 base::TimeTicks start; | |
| 48 base::TimeDelta duration; | |
| 49 | |
| 50 private: | |
| 51 DISALLOW_COPY_AND_ASSIGN(Animation); | |
| 52 }; | |
| 53 | |
| 54 } // namespace vr_shell | |
| 55 | |
| 56 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_ANIMATION_H_ | |
| OLD | NEW |