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..a05b3f047439e3fe1995a56ee317f8455b816fde 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,22 @@ void VrShellGl::SetSubmitClient( |
submit_client_.Bind(std::move(submit_client_info)); |
} |
+void VrShellGl::CreateUiElementInfos( |
+ std::vector<std::string> element_names, |
+ int callback_id, |
+ base::Callback<void(int, std::unique_ptr<base::DictionaryValue>)> |
+ on_created) { |
+ std::unique_ptr<base::DictionaryValue> reply = |
cjgrant
2017/03/29 21:16:06
s/std::unique_ptr<base::DictionaryValue>/auto/ is
bsheedy
2017/03/29 22:33:44
Done.
|
+ base::MakeUnique<base::DictionaryValue>(); |
+ for (unsigned int i = 0; i < element_names.size(); i++) { |
cjgrant
2017/03/29 21:16:06
for (const auto& name : element_names) {
reply->
bsheedy
2017/03/29 22:33:45
Done.
|
+ reply->Set(element_names[i], |
+ std::move(scene_->CreateUiElementInfo(element_names[i]))); |
+ } |
+ 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(); |
} |