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

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

Issue 2832873003: Add missing content quad element to native scene manager. (Closed)
Patch Set: 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
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/ui_scene_manager.cc
diff --git a/chrome/browser/android/vr_shell/ui_scene_manager.cc b/chrome/browser/android/vr_shell/ui_scene_manager.cc
index dfd3fa6e8f07eca712bdc435abe97e3976aec987..8030e673ae49eb79412fddfd5a6da2f852946169 100644
--- a/chrome/browser/android/vr_shell/ui_scene_manager.cc
+++ b/chrome/browser/android/vr_shell/ui_scene_manager.cc
@@ -62,6 +62,17 @@ UiSceneManager::UiSceneManager(UiScene* scene)
element->lock_to_fov = true;
transient_security_warning_ = element.get();
scene_->AddUiElement(std::move(element));
+
+ // Main web content quad.
+ element = base::MakeUnique<UiElement>();
+ element->id = id++;
+ element->name = "Content";
+ element->fill = vr_shell::Fill::CONTENT;
+ element->size = {(1.6f * (16 / 9)), 1.6f, 1};
+ element->translation = {0, 0, -2};
+ element->visible = false;
+ main_content_ = element.get();
+ scene_->AddUiElement(std::move(element));
}
UiSceneManager::~UiSceneManager() {}
@@ -72,6 +83,7 @@ base::WeakPtr<UiSceneManager> UiSceneManager::GetWeakPtr() {
void UiSceneManager::SetWebVRMode(bool web_vr) {
web_vr_mode_ = web_vr;
+ main_content_->visible = !web_vr_mode_;
ConfigureSecurityWarnings();
}
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698