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

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

Issue 2809143004: VR: Add a native UI element scene manager (Closed)
Patch Set: Rebase. 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/vr_gl_thread.cc ('k') | chrome/browser/android/vr_shell/vr_shell_gl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_shell.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell.cc b/chrome/browser/android/vr_shell/vr_shell.cc
index eaedca5ef4a909f7be5540c92b6da198a8457e21..76a71422222f2a3d6186e4e9625806e65d39d562 100644
--- a/chrome/browser/android/vr_shell/vr_shell.cc
+++ b/chrome/browser/android/vr_shell/vr_shell.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/android/tab_android.h"
#include "chrome/browser/android/vr_shell/android_ui_gesture_target.h"
#include "chrome/browser/android/vr_shell/ui_interface.h"
+#include "chrome/browser/android/vr_shell/ui_scene_manager.h"
#include "chrome/browser/android/vr_shell/vr_compositor.h"
#include "chrome/browser/android/vr_shell/vr_controller_model.h"
#include "chrome/browser/android/vr_shell/vr_gl_thread.h"
@@ -303,6 +304,8 @@ void VrShell::SetWebVrMode(JNIEnv* env,
html_interface_->SetMode(enabled ? UiInterface::Mode::WEB_VR
: UiInterface::Mode::STANDARD);
+ PostToGlThreadWhenReady(base::Bind(&UiSceneManager::SetWebVRMode,
+ gl_thread_->GetSceneManager(), enabled));
}
void VrShell::OnLoadProgressChanged(JNIEnv* env,
@@ -352,6 +355,9 @@ void VrShell::OnTabRemoved(JNIEnv* env,
void VrShell::SetWebVRSecureOrigin(bool secure_origin) {
// TODO(cjgrant): Align this state with the logic that drives the omnibox.
html_interface_->SetWebVRSecureOrigin(secure_origin);
+ PostToGlThreadWhenReady(base::Bind(&UiSceneManager::SetWebVRSecureOrigin,
+ gl_thread_->GetSceneManager(),
+ secure_origin));
}
void VrShell::SubmitWebVRFrame(int16_t frame_index,
@@ -468,8 +474,8 @@ UiInterface* VrShell::GetUiInterface() {
}
void VrShell::UpdateScene(const base::ListValue* args) {
- PostToGlThreadWhenReady(base::Bind(&VrShellGl::UpdateScene,
- gl_thread_->GetVrShellGl(),
+ PostToGlThreadWhenReady(base::Bind(&UiSceneManager::UpdateScene,
+ gl_thread_->GetSceneManager(),
base::Passed(args->CreateDeepCopy())));
}
« no previous file with comments | « chrome/browser/android/vr_shell/vr_gl_thread.cc ('k') | chrome/browser/android/vr_shell/vr_shell_gl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698