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

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 missing files 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..d263686139409b8dc15a89a40ec8658e2075113e 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,11 @@ void UiScene::ApplyRecursiveTransforms(UiElement* element) {
element->dirty = false;
}
+void UiScene::OnGLInitialized() {
+ gl_initialized_ = true;
+ for (const auto& element : ui_elements_) {
cjgrant 2017/04/21 14:30:13 This is another situation where the const should b
mthiesse 2017/04/21 15:05:12 No, because the unique_ptr is constant, but -> doe
cjgrant 2017/04/21 15:19:33 Right. I mean that we shouldn't bother with the c
mthiesse 2017/04/21 17:17:30 Fixed by getting rid of auto so it's not confusing
+ element->Initialize();
+ }
+}
+
} // namespace vr_shell

Powered by Google App Engine
This is Rietveld 408576698