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

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

Powered by Google App Engine
This is Rietveld 408576698