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

Unified Diff: device/vr/android/gvr/gvr_device.cc

Issue 2510873003: Clean up WebVR RequestPresent and make callback asynchronous. (Closed)
Patch Set: Fix FakeVRDevice Created 4 years, 1 month 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
« no previous file with comments | « device/vr/android/gvr/gvr_device.h ('k') | device/vr/android/gvr/gvr_device_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/android/gvr/gvr_device.cc
diff --git a/device/vr/android/gvr/gvr_device.cc b/device/vr/android/gvr/gvr_device.cc
index 5a01da20b93f634905ea70a7fefcb15c55054959..6e1c1bdec1a0aae69c5313215642aa429bce98cf 100644
--- a/device/vr/android/gvr/gvr_device.cc
+++ b/device/vr/android/gvr/gvr_device.cc
@@ -217,12 +217,14 @@ void GvrDevice::ResetPose() {
gvr_api->RecenterTracking();
}
-bool GvrDevice::RequestPresent(bool secure_origin) {
+void GvrDevice::RequestPresent(const base::Callback<void(bool)>& callback) {
+ gvr_provider_->RequestPresent(callback);
+}
+
+void GvrDevice::SetSecureOrigin(bool secure_origin) {
secure_origin_ = secure_origin;
if (delegate_)
delegate_->SetWebVRSecureOrigin(secure_origin_);
-
- return gvr_provider_->RequestPresent();
}
void GvrDevice::ExitPresent() {
« no previous file with comments | « device/vr/android/gvr/gvr_device.h ('k') | device/vr/android/gvr/gvr_device_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698