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 1a3fec581a94bb10491fb21e6cf34672087d6d0a..9fb75e4aa4d68068b48513b9a28c68179c589feb 100644 |
--- a/device/vr/android/gvr/gvr_device.cc |
+++ b/device/vr/android/gvr/gvr_device.cc |
@@ -185,7 +185,11 @@ void GvrDevice::ResetPose() { |
gvr_api->ResetTracking(); |
} |
-bool GvrDevice::RequestPresent() { |
+bool GvrDevice::RequestPresent(bool secure_origin) { |
+ LOG(ERROR) << "GvrDevice::RequestPresent: " << secure_origin; |
bshe
2016/09/29 12:46:47
Do you still need this log message?
|
+ secure_origin_ = secure_origin; |
+ if (delegate_) |
+ delegate_->SetWebVRSecureOrigin(secure_origin_); |
return gvr_provider_->RequestPresent(); |
} |
@@ -215,8 +219,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() { |