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(); |
} |