| 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 #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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 } | 205 } |
| 206 | 206 |
| 207 void UiScene::SetWebVrRenderingEnabled(bool enabled) { | 207 void UiScene::SetWebVrRenderingEnabled(bool enabled) { |
| 208 webvr_rendering_enabled_ = enabled; | 208 webvr_rendering_enabled_ = enabled; |
| 209 } | 209 } |
| 210 | 210 |
| 211 void UiScene::set_is_exiting() { | 211 void UiScene::set_is_exiting() { |
| 212 is_exiting_ = true; | 212 is_exiting_ = true; |
| 213 } | 213 } |
| 214 | 214 |
| 215 void UiScene::set_is_prompting_to_exit(bool prompting) { |
| 216 is_prompting_to_exit_ = prompting; |
| 217 } |
| 218 |
| 215 const std::vector<std::unique_ptr<UiElement>>& UiScene::GetUiElements() const { | 219 const std::vector<std::unique_ptr<UiElement>>& UiScene::GetUiElements() const { |
| 216 return ui_elements_; | 220 return ui_elements_; |
| 217 } | 221 } |
| 218 | 222 |
| 219 UiScene::UiScene() = default; | 223 UiScene::UiScene() = default; |
| 220 | 224 |
| 221 UiScene::~UiScene() = default; | 225 UiScene::~UiScene() = default; |
| 222 | 226 |
| 223 void UiScene::ApplyRecursiveTransforms(UiElement* element) { | 227 void UiScene::ApplyRecursiveTransforms(UiElement* element) { |
| 224 if (!element->dirty()) | 228 if (!element->dirty()) |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 266 |
| 263 // TODO(mthiesse): Move this to UiSceneManager. | 267 // TODO(mthiesse): Move this to UiSceneManager. |
| 264 void UiScene::OnGLInitialized() { | 268 void UiScene::OnGLInitialized() { |
| 265 gl_initialized_ = true; | 269 gl_initialized_ = true; |
| 266 for (auto& element : ui_elements_) { | 270 for (auto& element : ui_elements_) { |
| 267 element->Initialize(); | 271 element->Initialize(); |
| 268 } | 272 } |
| 269 } | 273 } |
| 270 | 274 |
| 271 } // namespace vr_shell | 275 } // namespace vr_shell |
| OLD | NEW |