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

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

Issue 2374153002: Expose secure origin state to WebVR renderer (Closed)
Patch Set: Rebase, remove stray logging, set explicit default Created 4 years, 3 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
« no previous file with comments | « device/vr/android/gvr/gvr_device.h ('k') | device/vr/android/gvr/gvr_device_provider.cc » ('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 0bda52602798098b3edfa782ce3365ebb7ff93e1..df2a7caf5e69e1f626706d142166a9801325d3b5 100644
--- a/device/vr/android/gvr/gvr_device.cc
+++ b/device/vr/android/gvr/gvr_device.cc
@@ -183,7 +183,10 @@ void GvrDevice::ResetPose() {
gvr_api->ResetTracking();
}
-bool GvrDevice::RequestPresent() {
+bool GvrDevice::RequestPresent(bool secure_origin) {
+ secure_origin_ = secure_origin;
+ if (delegate_)
+ delegate_->SetWebVRSecureOrigin(secure_origin_);
return gvr_provider_->RequestPresent();
}
@@ -213,8 +216,10 @@ void GvrDevice::SetDelegate(GvrDelegate* delegate) {
delegate_ = delegate;
// Notify the clients that this device has changed
- if (delegate_)
+ if (delegate_) {
+ delegate_->SetWebVRSecureOrigin(secure_origin_);
VRDeviceManager::GetInstance()->OnDeviceChanged(GetVRDevice());
+ }
}
gvr::GvrApi* GvrDevice::GetGvrApi() {
« no previous file with comments | « device/vr/android/gvr/gvr_device.h ('k') | device/vr/android/gvr/gvr_device_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698