Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: chrome/browser/android/vr_shell/animation.h

Issue 2801073002: [vr] Use base's time classes (Closed)
Patch Set: updated tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/animation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_ANDROID_VR_SHELL_ANIMATION_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_ANIMATION_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_ANIMATION_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_ANIMATION_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/time/time.h"
12 13
13 namespace vr_shell { 14 namespace vr_shell {
14 15
15 namespace easing { 16 namespace easing {
16 class Easing; 17 class Easing;
17 } 18 }
18 19
19 // Describes the characteristics of a transition from an initial set of values 20 // Describes the characteristics of a transition from an initial set of values
20 // to a final set, with timing and interpolation information. Other classes use 21 // to a final set, with timing and interpolation information. Other classes use
21 // this information to animate UI element location, size, and other properties. 22 // this information to animate UI element location, size, and other properties.
22 class Animation { 23 class Animation {
23 public: 24 public:
24 enum Property { 25 enum Property {
25 COPYRECT = 0, 26 COPYRECT = 0,
26 SIZE, 27 SIZE,
27 TRANSLATION, 28 TRANSLATION,
28 SCALE, 29 SCALE,
29 ROTATION, 30 ROTATION,
30 OPACITY, 31 OPACITY,
31 }; 32 };
32 33
33 Animation(int id, 34 Animation(int id,
34 Property property, 35 Property property,
35 std::unique_ptr<easing::Easing> easing, 36 std::unique_ptr<easing::Easing> easing,
36 std::vector<float> from, 37 std::vector<float> from,
37 std::vector<float> to, 38 std::vector<float> to,
38 int64_t start, 39 const base::TimeTicks& start,
39 int64_t duration); 40 const base::TimeDelta& duration);
40 ~Animation(); 41 ~Animation();
41 42
42 int id; 43 int id;
43 Property property; 44 Property property;
44 std::unique_ptr<easing::Easing> easing; 45 std::unique_ptr<easing::Easing> easing;
45 std::vector<float> from; 46 std::vector<float> from;
46 std::vector<float> to; 47 std::vector<float> to;
47 int64_t start; 48 base::TimeTicks start;
48 int64_t duration; 49 base::TimeDelta duration;
49 50
50 private: 51 private:
51 DISALLOW_COPY_AND_ASSIGN(Animation); 52 DISALLOW_COPY_AND_ASSIGN(Animation);
52 }; 53 };
53 54
54 } // namespace vr_shell 55 } // namespace vr_shell
55 56
56 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_ANIMATION_H_ 57 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_ANIMATION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698