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

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

Issue 2361533003: Expose secure origin state to WebVR renderer (Closed)
Patch Set: Rebase 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..7df0f6cb0773c085619381eb0d0f588f24a1ddcf 100644
--- a/device/vr/android/gvr/gvr_device.cc
+++ b/device/vr/android/gvr/gvr_device.cc
@@ -183,7 +183,11 @@ void GvrDevice::ResetPose() {
gvr_api->ResetTracking();
}
-bool GvrDevice::RequestPresent() {
+bool GvrDevice::RequestPresent(bool secure_origin) {
+ LOG(ERROR) << "GvrDevice::RequestPresent: " << secure_origin;
+ secure_origin_ = secure_origin;
+ if (delegate_)
+ delegate_->SetWebVRSecureOrigin(secure_origin_);
return gvr_provider_->RequestPresent();
}
@@ -213,8 +217,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