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

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

Issue 2624243002: VrShell: Allow native control of UI element opacity. (Closed)
Patch Set: for (auto nit : nits) nit.fix(); Created 3 years, 11 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/ui_elements.h » ('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 12
13 namespace vr_shell { 13 namespace vr_shell {
14 14
15 namespace easing { 15 namespace easing {
16 class Easing; 16 class Easing;
17 } 17 }
18 18
19 // Describes the characteristics of a transition from an initial set of values 19 // 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 20 // to a final set, with timing and interpolation information. Other classes use
21 // this information to animate UI element location, size, and other properties. 21 // this information to animate UI element location, size, and other properties.
22 class Animation { 22 class Animation {
23 public: 23 public:
24 enum Property { 24 enum Property {
25 COPYRECT = 0, 25 COPYRECT = 0,
26 SIZE, 26 SIZE,
27 TRANSLATION, 27 TRANSLATION,
28 SCALE, 28 SCALE,
29 ROTATION, 29 ROTATION,
30 OPACITY,
30 }; 31 };
31 32
32 Animation(int id, 33 Animation(int id,
33 Property property, 34 Property property,
34 std::unique_ptr<easing::Easing> easing, 35 std::unique_ptr<easing::Easing> easing,
35 std::vector<float> from, 36 std::vector<float> from,
36 std::vector<float> to, 37 std::vector<float> to,
37 int64_t start, 38 int64_t start,
38 int64_t duration); 39 int64_t duration);
39 ~Animation(); 40 ~Animation();
40 41
41 int id; 42 int id;
42 Property property; 43 Property property;
43 std::unique_ptr<easing::Easing> easing; 44 std::unique_ptr<easing::Easing> easing;
44 std::vector<float> from; 45 std::vector<float> from;
45 std::vector<float> to; 46 std::vector<float> to;
46 int64_t start; 47 int64_t start;
47 int64_t duration; 48 int64_t duration;
48 49
49 private: 50 private:
50 DISALLOW_COPY_AND_ASSIGN(Animation); 51 DISALLOW_COPY_AND_ASSIGN(Animation);
51 }; 52 };
52 53
53 } // namespace vr_shell 54 } // namespace vr_shell
54 55
55 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_ANIMATION_H_ 56 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_ANIMATION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/ui_elements.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698