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 c3b906768d2fd7e09fea01670323b19e788e14ad..8e08326f5a9acf0f66817bed2c5ff994382ff08a 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,20 @@ void VrShellGl::SetSubmitClient( |
submit_client_.Bind(std::move(submit_client_info)); |
} |
+void VrShellGl::CreateUiElementInfos( |
+ const std::vector<std::string>& element_names, |
+ int callback_id, |
+ base::Callback<void(int, 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, callback_id, base::Passed(std::move(reply)))); |
+} |
+ |
void VrShellGl::OnUIFrameAvailable() { |
ui_surface_texture_->UpdateTexImage(); |
} |