| 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_SCENE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 std::vector<const UiElement*> GetWorldElements() const; | 61 std::vector<const UiElement*> GetWorldElements() const; |
| 62 std::vector<const UiElement*> GetHeadLockedElements() const; | 62 std::vector<const UiElement*> GetHeadLockedElements() const; |
| 63 bool HasVisibleHeadLockedElements() const; | 63 bool HasVisibleHeadLockedElements() const; |
| 64 | 64 |
| 65 void SetBackgroundColor(const vr::Colorf& color); | 65 void SetBackgroundColor(const vr::Colorf& color); |
| 66 const vr::Colorf& GetBackgroundColor() const; | 66 const vr::Colorf& GetBackgroundColor() const; |
| 67 void SetBackgroundDistance(float distance); | 67 void SetBackgroundDistance(float distance); |
| 68 float GetBackgroundDistance() const; | 68 float GetBackgroundDistance() const; |
| 69 | 69 |
| 70 bool GetWebVrRenderingEnabled() const; | 70 bool GetWebVrRenderingEnabled() const; |
| 71 void SetWebVrRenderingEnabled(bool enabled); |
| 71 | 72 |
| 72 void OnGLInitialized(); | 73 void OnGLInitialized(); |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 void ApplyRecursiveTransforms(UiElement* element); | 76 void ApplyRecursiveTransforms(UiElement* element); |
| 76 | 77 |
| 77 std::vector<std::unique_ptr<UiElement>> ui_elements_; | 78 std::vector<std::unique_ptr<UiElement>> ui_elements_; |
| 78 UiElement* content_element_ = nullptr; | 79 UiElement* content_element_ = nullptr; |
| 79 vr::Colorf background_color_ = {0.1f, 0.1f, 0.1f, 1.0f}; | 80 vr::Colorf background_color_ = {0.1f, 0.1f, 0.1f, 1.0f}; |
| 80 float background_distance_ = 10.0f; | 81 float background_distance_ = 10.0f; |
| 81 bool webvr_rendering_enabled_ = true; | 82 bool webvr_rendering_enabled_ = true; |
| 82 bool gl_initialized_ = false; | 83 bool gl_initialized_ = false; |
| 83 | 84 |
| 84 DISALLOW_COPY_AND_ASSIGN(UiScene); | 85 DISALLOW_COPY_AND_ASSIGN(UiScene); |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 } // namespace vr_shell | 88 } // namespace vr_shell |
| 88 | 89 |
| 89 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ | 90 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ |
| OLD | NEW |