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

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

Issue 2624243002: VrShell: Allow native control of UI element opacity. (Closed)
Patch Set: 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
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_UI_ELEMENTS_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // The scale of the object, and its children. 93 // The scale of the object, and its children.
94 gvr::Vec3f scale = {1.0f, 1.0f, 1.0f}; 94 gvr::Vec3f scale = {1.0f, 1.0f, 1.0f};
95 95
96 // The rotation of the object, and its children. 96 // The rotation of the object, and its children.
97 RotationAxisAngle rotation = {1.0f, 0.0f, 0.0f, 0.0f}; 97 RotationAxisAngle rotation = {1.0f, 0.0f, 0.0f, 0.0f};
98 98
99 // The translation of the object, and its children. Translation is applied 99 // The translation of the object, and its children. Translation is applied
100 // after rotation and scaling. 100 // after rotation and scaling.
101 gvr::Vec3f translation = {0.0f, 0.0f, 0.0f}; 101 gvr::Vec3f translation = {0.0f, 0.0f, 0.0f};
102 102
103 // The opacity of the object (between 0.0 and 1.0).
104 float opacity = 1.0f;
105
106 // The computed opacity, incorporating opacity of parent objects.
107 float computed_opacity;
108
103 // If anchoring is specified, the translation will be relative to the 109 // If anchoring is specified, the translation will be relative to the
104 // specified edge(s) of the parent, rather than the center. A parent object 110 // specified edge(s) of the parent, rather than the center. A parent object
105 // must be specified when using anchoring. 111 // must be specified when using anchoring.
106 XAnchoring x_anchoring = XAnchoring::XNONE; 112 XAnchoring x_anchoring = XAnchoring::XNONE;
107 YAnchoring y_anchoring = YAnchoring::YNONE; 113 YAnchoring y_anchoring = YAnchoring::YNONE;
108 114
109 // Animations that affect the properties of the object over time. 115 // Animations that affect the properties of the object over time.
110 std::vector<std::unique_ptr<Animation>> animations; 116 std::vector<std::unique_ptr<Animation>> animations;
111 117
112 private: 118 private:
113 DISALLOW_COPY_AND_ASSIGN(ContentRectangle); 119 DISALLOW_COPY_AND_ASSIGN(ContentRectangle);
114 }; 120 };
115 121
116 } // namespace vr_shell 122 } // namespace vr_shell
117 123
118 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_H_ 124 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698