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

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

Issue 2773903003: Add way to get native VR UI information from Java (Closed)
Patch Set: Remove comment Created 3 years, 9 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/vr_shell_gl.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell_gl.cc b/chrome/browser/android/vr_shell/vr_shell_gl.cc
index 04576097918cdeb873940654a892d8a31229dee4..1023d7539b6b6e1c00d490e9ab9187acb0f49f5b 100644
--- a/chrome/browser/android/vr_shell/vr_shell_gl.cc
+++ b/chrome/browser/android/vr_shell/vr_shell_gl.cc
@@ -6,6 +6,7 @@
#include <chrono>
#include <limits>
+#include <string>
#include <utility>
#include "base/android/jni_android.h"
@@ -340,6 +341,18 @@ void VrShellGl::SetSubmitClient(
submit_client_.Bind(std::move(submit_client_info));
}
+void VrShellGl::CreateUiElementInfos(
+ const std::vector<std::string>& element_names,
+ const base::Callback<void(std::unique_ptr<base::DictionaryValue>)>&
+ on_created) {
+ auto reply = base::MakeUnique<base::DictionaryValue>();
+ for (const auto& name : element_names) {
+ reply->Set(name, std::move(scene_->CreateUiElementInfo(name)));
+ }
+ main_thread_task_runner_->PostTask(
+ FROM_HERE, base::Bind(on_created, base::Passed(std::move(reply))));
+}
+
void VrShellGl::OnUIFrameAvailable() {
ui_surface_texture_->UpdateTexImage();
}

Powered by Google App Engine
This is Rietveld 408576698