| OLD | NEW |
| 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 <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "chrome/browser/android/vr_shell/vr_math.h" | 13 #include "chrome/browser/android/vr_shell/vr_math.h" |
| 14 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
gvr_types.h" | 14 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
gvr_types.h" |
| 15 | 15 |
| 16 namespace base { |
| 17 class TimeTicks; |
| 18 } |
| 19 |
| 16 namespace vr_shell { | 20 namespace vr_shell { |
| 17 | 21 |
| 18 class Animation; | 22 class Animation; |
| 19 | 23 |
| 20 enum XAnchoring { | 24 enum XAnchoring { |
| 21 XNONE = 0, | 25 XNONE = 0, |
| 22 XLEFT, | 26 XLEFT, |
| 23 XRIGHT, | 27 XRIGHT, |
| 24 }; | 28 }; |
| 25 | 29 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 gvr::Vec2f GetUnitRectangleCoordinates(const gvr::Vec3f& world_point); | 84 gvr::Vec2f GetUnitRectangleCoordinates(const gvr::Vec3f& world_point); |
| 81 | 85 |
| 82 private: | 86 private: |
| 83 Transform transform_; | 87 Transform transform_; |
| 84 }; | 88 }; |
| 85 | 89 |
| 86 struct ContentRectangle : public WorldRectangle { | 90 struct ContentRectangle : public WorldRectangle { |
| 87 ContentRectangle(); | 91 ContentRectangle(); |
| 88 ~ContentRectangle(); | 92 ~ContentRectangle(); |
| 89 | 93 |
| 90 void Animate(int64_t time); | 94 void Animate(const base::TimeTicks& time); |
| 91 | 95 |
| 92 // Indicates whether the element should be visually rendered. | 96 // Indicates whether the element should be visually rendered. |
| 93 bool IsVisible() const; | 97 bool IsVisible() const; |
| 94 | 98 |
| 95 // Indicates whether the element should be tested for cursor input. | 99 // Indicates whether the element should be tested for cursor input. |
| 96 bool IsHitTestable() const; | 100 bool IsHitTestable() const; |
| 97 | 101 |
| 98 // Valid IDs are non-negative. | 102 // Valid IDs are non-negative. |
| 99 int id = -1; | 103 int id = -1; |
| 100 | 104 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 // A flag usable during transformation calculates to avoid duplicate work. | 168 // A flag usable during transformation calculates to avoid duplicate work. |
| 165 bool dirty; | 169 bool dirty; |
| 166 | 170 |
| 167 private: | 171 private: |
| 168 DISALLOW_COPY_AND_ASSIGN(ContentRectangle); | 172 DISALLOW_COPY_AND_ASSIGN(ContentRectangle); |
| 169 }; | 173 }; |
| 170 | 174 |
| 171 } // namespace vr_shell | 175 } // namespace vr_shell |
| 172 | 176 |
| 173 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_H_ | 177 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_H_ |
| OLD | NEW |