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

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

Issue 2510873003: Clean up WebVR RequestPresent and make callback asynchronous. (Closed)
Patch Set: Address comments 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
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 71358494c132b368391a79ce7c0c71228120f738..a9e940fbf1b2f3e3a89f31b1058c915e61fcb990 100644
--- a/device/vr/android/gvr/gvr_device.cc
+++ b/device/vr/android/gvr/gvr_device.cc
@@ -200,12 +200,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() {

Powered by Google App Engine
This is Rietveld 408576698