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

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

Issue 2844313002: Add VR gradient and grid background to non-WebVR scene. (Closed)
Patch Set: 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 #include "chrome/browser/android/vr_shell/ui_scene.h" 5 #include "chrome/browser/android/vr_shell/ui_scene.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 elements.push_back(element.get()); 139 elements.push_back(element.get());
140 } 140 }
141 } 141 }
142 return elements; 142 return elements;
143 } 143 }
144 144
145 bool UiScene::HasVisibleHeadLockedElements() const { 145 bool UiScene::HasVisibleHeadLockedElements() const {
146 return !GetHeadLockedElements().empty(); 146 return !GetHeadLockedElements().empty();
147 } 147 }
148 148
149 void UiScene::SetBackgroundColor(const vr::Colorf& color) {
150 background_color_ = color;
151 }
152
149 const vr::Colorf& UiScene::GetBackgroundColor() const { 153 const vr::Colorf& UiScene::GetBackgroundColor() const {
150 return background_color_; 154 return background_color_;
151 } 155 }
152 156
157 void UiScene::SetBackgroundDistance(float distance) {
158 background_distance_ = distance;
159 }
160
153 float UiScene::GetBackgroundDistance() const { 161 float UiScene::GetBackgroundDistance() const {
154 return background_distance_; 162 return background_distance_;
155 } 163 }
156 164
157 bool UiScene::GetWebVrRenderingEnabled() const { 165 bool UiScene::GetWebVrRenderingEnabled() const {
158 return webvr_rendering_enabled_; 166 return webvr_rendering_enabled_;
159 } 167 }
160 168
161 const std::vector<std::unique_ptr<UiElement>>& UiScene::GetUiElements() const { 169 const std::vector<std::unique_ptr<UiElement>>& UiScene::GetUiElements() const {
162 return ui_elements_; 170 return ui_elements_;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 215
208 // TODO(mthiesse): Move this to UiSceneManager. 216 // TODO(mthiesse): Move this to UiSceneManager.
209 void UiScene::OnGLInitialized() { 217 void UiScene::OnGLInitialized() {
210 gl_initialized_ = true; 218 gl_initialized_ = true;
211 for (const std::unique_ptr<UiElement>& element : ui_elements_) { 219 for (const std::unique_ptr<UiElement>& element : ui_elements_) {
212 element->Initialize(); 220 element->Initialize();
213 } 221 }
214 } 222 }
215 223
216 } // namespace vr_shell 224 } // namespace vr_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698