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

Unified Diff: chrome/browser/android/vr_shell/ui_scene.cc

Issue 2834543006: Hook up insecure content warnings for http webVR presentation. (Closed)
Patch Set: add todo Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/ui_scene.cc
diff --git a/chrome/browser/android/vr_shell/ui_scene.cc b/chrome/browser/android/vr_shell/ui_scene.cc
index 9982c988caa67049f2618b565fb6d773284eb320..6a132e9a5fbc01f424615af227486806a70e2e21 100644
--- a/chrome/browser/android/vr_shell/ui_scene.cc
+++ b/chrome/browser/android/vr_shell/ui_scene.cc
@@ -62,6 +62,8 @@ void UiScene::AddUiElement(std::unique_ptr<UiElement> element) {
CHECK_EQ(element->x_anchoring, XAnchoring::XNONE);
CHECK_EQ(element->y_anchoring, YAnchoring::YNONE);
}
+ if (gl_initialized_)
+ element->Initialize();
ui_elements_.push_back(std::move(element));
}
@@ -203,4 +205,12 @@ void UiScene::ApplyRecursiveTransforms(UiElement* element) {
element->dirty = false;
}
+// TODO(mthiesse): Move this to UiSceneManager.
+void UiScene::OnGLInitialized() {
+ gl_initialized_ = true;
+ for (const auto& element : ui_elements_) {
+ element->Initialize();
+ }
+}
+
} // namespace vr_shell

Powered by Google App Engine
This is Rietveld 408576698