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

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

Issue 2434013002: Implement a means of letting native VR Shell control the HTML UI. (Closed)
Patch Set: Remove use of cr.define() Created 4 years, 2 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_shell.h ('k') | chrome/browser/resources/vr_shell/vr_shell_ui.js » ('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 9f1bb69260ffe0abdcdd3bbe6189d19fcd743a16..e024aab4dc8ab5b8ebf32e1dfde3d5f858db1463 100644
--- a/chrome/browser/android/vr_shell/vr_shell.cc
+++ b/chrome/browser/android/vr_shell/vr_shell.cc
@@ -6,6 +6,7 @@
#include "base/metrics/histogram_macros.h"
#include "chrome/browser/android/vr_shell/ui_elements.h"
+#include "chrome/browser/android/vr_shell/ui_interface.h"
#include "chrome/browser/android/vr_shell/ui_scene.h"
#include "chrome/browser/android/vr_shell/vr_compositor.h"
#include "chrome/browser/android/vr_shell/vr_controller.h"
@@ -142,6 +143,7 @@ VrShell::VrShell(JNIEnv* env, jobject obj,
g_instance = this;
j_vr_shell_.Reset(env, obj);
scene_.reset(new UiScene);
+ html_interface_.reset(new UiInterface);
content_compositor_.reset(new VrCompositor(content_window, false));
ui_compositor_.reset(new VrCompositor(ui_window, true));
@@ -749,6 +751,7 @@ void VrShell::OnDomContentsLoaded() {
// should fix.
ui_contents_->GetRenderWidgetHostView()->SetBackgroundColor(
SK_ColorTRANSPARENT);
+ html_interface_->OnDomContentsLoaded();
}
void VrShell::SetWebVrMode(JNIEnv* env,
@@ -812,6 +815,10 @@ UiScene* VrShell::GetScene() {
return scene_.get();
}
+UiInterface* VrShell::GetUiInterface() {
+ return html_interface_.get();
+}
+
void VrShell::QueueTask(base::Callback<void()>& callback) {
base::AutoLock lock(task_queue_lock_);
task_queue_.push(callback);
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.h ('k') | chrome/browser/resources/vr_shell/vr_shell_ui.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698