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

Unified Diff: device/vr/vr_device.cc

Issue 2746233002: Fixes 2D-to-WebVR site transitions when browsing in VR. (Closed)
Patch Set: Created 3 years, 9 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
Index: device/vr/vr_device.cc
diff --git a/device/vr/vr_device.cc b/device/vr/vr_device.cc
index 03a968568ceba3ee70737b26934c4210e25931de..a8557b852ddf9e25f806e328209aabc4e8df3ecc 100644
--- a/device/vr/vr_device.cc
+++ b/device/vr/vr_device.cc
@@ -46,14 +46,14 @@ bool VRDevice::CheckPresentingDisplay(VRDisplayImpl* display) {
void VRDevice::OnChanged() {
base::Callback<void(mojom::VRDisplayInfoPtr)> callback = base::Bind(
&VRDevice::OnVRDisplayInfoCreated, weak_ptr_factory_.GetWeakPtr());
- GetVRDevice(callback);
+ CreateVRDisplayInfo(callback);
}
void VRDevice::OnVRDisplayInfoCreated(mojom::VRDisplayInfoPtr vr_device_info) {
if (vr_device_info.is_null())
return;
for (auto* display : displays_)
- display->client()->OnChanged(vr_device_info.Clone());
+ display->OnChanged(vr_device_info.Clone());
}
void VRDevice::OnExitPresent() {
@@ -61,28 +61,28 @@ void VRDevice::OnExitPresent() {
return;
auto it = displays_.find(presenting_display_);
CHECK(it != displays_.end());
- (*it)->client()->OnExitPresent();
+ (*it)->OnExitPresent();
SetPresentingDisplay(nullptr);
}
void VRDevice::OnBlur() {
for (auto* display : displays_)
- display->client()->OnBlur();
+ display->OnBlur();
}
void VRDevice::OnFocus() {
for (auto* display : displays_)
- display->client()->OnFocus();
+ display->OnFocus();
}
void VRDevice::OnActivate(mojom::VRDisplayEventReason reason) {
for (auto* display : displays_)
- display->client()->OnActivate(reason);
+ display->OnActivate(reason);
}
void VRDevice::OnDeactivate(mojom::VRDisplayEventReason reason) {
for (auto* display : displays_)
- display->client()->OnDeactivate(reason);
+ display->OnDeactivate(reason);
}
void VRDevice::SetPresentingDisplay(VRDisplayImpl* display) {

Powered by Google App Engine
This is Rietveld 408576698