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 "chrome/browser/android/vr_shell/easing.h" |
| 12 |
| 13 namespace vr_shell { |
| 14 |
| 15 // Describes the characteristics of a transition from an initial set of values |
| 16 // to a final set, with timing and interpolation information. Other classes use |
| 17 // this information to animate UI element location, size, and other properties. |
| 18 class Animation { |
| 19 public: |
| 20 enum Property { |
| 21 COPYRECT = 0, |
| 22 SIZE, |
| 23 TRANSLATION, |
| 24 UNUSED, // No longer used, available for a future type. |
| 25 ROTATION, |
| 26 }; |
| 27 |
| 28 Animation(int id, |
| 29 Property property, |
| 30 std::unique_ptr<easing::Easing> easing, |
| 31 std::vector<float> from, |
| 32 std::vector<float> to, |
| 33 int64_t start, |
| 34 int64_t duration); |
| 35 ~Animation(); |
| 36 |
| 37 int id; |
| 38 Property property; |
| 39 std::unique_ptr<easing::Easing> easing; |
| 40 std::vector<float> from; |
| 41 std::vector<float> to; |
| 42 int64_t start; |
| 43 int64_t duration; |
| 44 }; |
| 45 |
| 46 } // namespace vr_shell |
| 47 |
| 48 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_ANIMATION_H_ |
OLD | NEW |