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

Unified Diff: device/vr/vr_device.cc

Issue 2746233002: Fixes 2D-to-WebVR site transitions when browsing in VR. (Closed)
Patch Set: Fixed export 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
« no previous file with comments | « device/vr/vr_device.h ('k') | device/vr/vr_device_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/vr_device.cc
diff --git a/device/vr/vr_device.cc b/device/vr/vr_device.cc
index 00e942518dbe7075a57fa076e8e03d1b7bcf8fd1..6a33287be5959f355154455d55fbc12a3b9a81c3 100644
--- a/device/vr/vr_device.cc
+++ b/device/vr/vr_device.cc
@@ -40,14 +40,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() {
@@ -55,28 +55,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) {
« no previous file with comments | « device/vr/vr_device.h ('k') | device/vr/vr_device_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698