| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 void UpdateTransforms(float screen_tilt, int64_t time_in_micro); | 64 void UpdateTransforms(float screen_tilt, int64_t time_in_micro); |
| 65 | 65 |
| 66 // Handle a batch of commands passed from the UI HTML. | 66 // Handle a batch of commands passed from the UI HTML. |
| 67 void HandleCommands(std::unique_ptr<base::ListValue> commands, | 67 void HandleCommands(std::unique_ptr<base::ListValue> commands, |
| 68 int64_t time_in_micro); | 68 int64_t time_in_micro); |
| 69 | 69 |
| 70 const std::vector<std::unique_ptr<ContentRectangle>>& GetUiElements() const; | 70 const std::vector<std::unique_ptr<ContentRectangle>>& GetUiElements() const; |
| 71 | 71 |
| 72 ContentRectangle* GetUiElementById(int element_id); | 72 ContentRectangle* GetUiElementById(int element_id); |
| 73 | 73 |
| 74 ContentRectangle* GetContentQuad(); | |
| 75 | |
| 76 const Colorf& GetBackgroundColor(); | 74 const Colorf& GetBackgroundColor(); |
| 75 float GetBackgroundDistance(); |
| 77 | 76 |
| 78 private: | 77 private: |
| 79 void ApplyRecursiveTransforms(const ContentRectangle& element, | 78 void ApplyRecursiveTransforms(const ContentRectangle& element, |
| 80 ReversibleTransform* transform, | 79 ReversibleTransform* transform, |
| 81 float* opacity); | 80 float* opacity); |
| 82 void ApplyDictToElement(const base::DictionaryValue& dict, | 81 void ApplyDictToElement(const base::DictionaryValue& dict, |
| 83 ContentRectangle *element); | 82 ContentRectangle *element); |
| 84 | 83 |
| 85 std::vector<std::unique_ptr<ContentRectangle>> ui_elements_; | 84 std::vector<std::unique_ptr<ContentRectangle>> ui_elements_; |
| 86 ContentRectangle* content_element_ = nullptr; | 85 ContentRectangle* content_element_ = nullptr; |
| 87 Colorf background_color_ = {0.1f, 0.1f, 0.1f, 1.0f}; | 86 Colorf background_color_ = {0.1f, 0.1f, 0.1f, 1.0f}; |
| 87 float background_distance_ = 10.0f; |
| 88 | 88 |
| 89 DISALLOW_COPY_AND_ASSIGN(UiScene); | 89 DISALLOW_COPY_AND_ASSIGN(UiScene); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 } // namespace vr_shell | 92 } // namespace vr_shell |
| 93 | 93 |
| 94 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ | 94 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ |
| OLD | NEW |