| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 ContentRectangle* GetUiElementById(int element_id); | 70 ContentRectangle* GetUiElementById(int element_id); |
| 71 | 71 |
| 72 std::vector<const ContentRectangle*> GetWorldElements() const; | 72 std::vector<const ContentRectangle*> GetWorldElements() const; |
| 73 std::vector<const ContentRectangle*> GetHeadLockedElements() const; | 73 std::vector<const ContentRectangle*> GetHeadLockedElements() const; |
| 74 bool HasVisibleHeadLockedElements() const; | 74 bool HasVisibleHeadLockedElements() const; |
| 75 | 75 |
| 76 const Colorf& GetBackgroundColor() const; | 76 const Colorf& GetBackgroundColor() const; |
| 77 float GetBackgroundDistance() const; | 77 float GetBackgroundDistance() const; |
| 78 bool GetWebVrRenderingEnabled() const; | 78 bool GetWebVrRenderingEnabled() const; |
| 79 | 79 |
| 80 std::unique_ptr<base::DictionaryValue> CreateUiElementInfo(int element_id); |
| 81 |
| 80 private: | 82 private: |
| 81 void ApplyRecursiveTransforms(const ContentRectangle& element, | 83 void ApplyRecursiveTransforms(const ContentRectangle& element, |
| 82 Transform* transform, | 84 Transform* transform, |
| 83 float* opacity, | 85 float* opacity, |
| 84 bool* lock_to_fov); | 86 bool* lock_to_fov); |
| 85 void ApplyDictToElement(const base::DictionaryValue& dict, | 87 void ApplyDictToElement(const base::DictionaryValue& dict, |
| 86 ContentRectangle* element); | 88 ContentRectangle* element); |
| 87 | 89 |
| 88 std::vector<std::unique_ptr<ContentRectangle>> ui_elements_; | 90 std::vector<std::unique_ptr<ContentRectangle>> ui_elements_; |
| 89 ContentRectangle* content_element_ = nullptr; | 91 ContentRectangle* content_element_ = nullptr; |
| 90 Colorf background_color_ = {0.1f, 0.1f, 0.1f, 1.0f}; | 92 Colorf background_color_ = {0.1f, 0.1f, 0.1f, 1.0f}; |
| 91 float background_distance_ = 10.0f; | 93 float background_distance_ = 10.0f; |
| 92 bool webvr_rendering_enabled_ = true; | 94 bool webvr_rendering_enabled_ = true; |
| 93 | 95 |
| 94 DISALLOW_COPY_AND_ASSIGN(UiScene); | 96 DISALLOW_COPY_AND_ASSIGN(UiScene); |
| 95 }; | 97 }; |
| 96 | 98 |
| 97 } // namespace vr_shell | 99 } // namespace vr_shell |
| 98 | 100 |
| 99 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ | 101 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ |
| OLD | NEW |