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

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

Issue 2844313002: Add VR gradient and grid background to non-WebVR scene. (Closed)
Patch Set: Rebase onto amp@'s magic number CL. Created 3 years, 7 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_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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 const base::TimeTicks& current_time); 55 const base::TimeTicks& current_time);
56 56
57 const std::vector<std::unique_ptr<UiElement>>& GetUiElements() const; 57 const std::vector<std::unique_ptr<UiElement>>& GetUiElements() const;
58 58
59 UiElement* GetUiElementById(int element_id); 59 UiElement* GetUiElementById(int element_id);
60 60
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 const vr::Colorf& GetBackgroundColor() const; 66 const vr::Colorf& GetBackgroundColor() const;
67 void SetBackgroundDistance(float distance);
66 float GetBackgroundDistance() const; 68 float GetBackgroundDistance() const;
69
67 bool GetWebVrRenderingEnabled() const; 70 bool GetWebVrRenderingEnabled() const;
68 71
69 void OnGLInitialized(); 72 void OnGLInitialized();
70 73
71 private: 74 private:
72 void ApplyRecursiveTransforms(UiElement* element); 75 void ApplyRecursiveTransforms(UiElement* element);
73 76
74 std::vector<std::unique_ptr<UiElement>> ui_elements_; 77 std::vector<std::unique_ptr<UiElement>> ui_elements_;
75 UiElement* content_element_ = nullptr; 78 UiElement* content_element_ = nullptr;
76 vr::Colorf background_color_ = {0.1f, 0.1f, 0.1f, 1.0f}; 79 vr::Colorf background_color_ = {0.1f, 0.1f, 0.1f, 1.0f};
77 float background_distance_ = 10.0f; 80 float background_distance_ = 10.0f;
78 bool webvr_rendering_enabled_ = true; 81 bool webvr_rendering_enabled_ = true;
79 bool gl_initialized_ = false; 82 bool gl_initialized_ = false;
80 83
81 DISALLOW_COPY_AND_ASSIGN(UiScene); 84 DISALLOW_COPY_AND_ASSIGN(UiScene);
82 }; 85 };
83 86
84 } // namespace vr_shell 87 } // namespace vr_shell
85 88
86 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_ 89 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_SCENE_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/ui_elements/ui_element.h ('k') | chrome/browser/android/vr_shell/ui_scene.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698