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 587c233fa5b55a6d3916c2c89d31676ba5df54af..3f23cb4bfe515d7031514f2145f74b3e5cca9506 100644 |
--- a/chrome/browser/android/vr_shell/vr_shell_gl.cc |
+++ b/chrome/browser/android/vr_shell/vr_shell_gl.cc |
@@ -339,6 +339,22 @@ void VrShellGl::SetSubmitClient( |
submit_client_.Bind(std::move(submit_client_info)); |
} |
+void VrShellGl::CreateUiElementInfos( |
+ std::vector<int> element_ids, |
+ int callback_id, |
+ base::Callback<void(int, std::unique_ptr<base::DictionaryValue>)> |
+ onCreate) { |
tiborg
2017/03/27 15:14:33
Nit: I think we generally follow the convention to
bsheedy
2017/03/27 17:49:09
Done.
|
+ std::unique_ptr<base::DictionaryValue> reply = |
+ base::MakeUnique<base::DictionaryValue>(); |
+ for (unsigned int i = 0; i < element_ids.size(); i++) { |
+ reply->Set(std::to_string(element_ids[i]), |
+ std::move(scene_->CreateUiElementInfo(element_ids[i]))); |
+ } |
+ main_thread_task_runner_->PostTask( |
+ FROM_HERE, |
+ base::Bind(onCreate, callback_id, base::Passed(std::move(reply)))); |
+} |
+ |
void VrShellGl::OnUIFrameAvailable() { |
ui_surface_texture_->UpdateTexImage(); |
} |