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

Unified Diff: device/vr/vr_device.cc

Issue 2505493004: Wired up vrdisplayactivate/deactivate (Closed)
Patch Set: Again with the upstream issues Created 4 years, 1 month 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_service.mojom » ('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 59abe735e72a5aae48fc94dcf57035139cfe4ca1..89c330452156e783b9b35aeb4519fb277736987a 100644
--- a/device/vr/vr_device.cc
+++ b/device/vr/vr_device.cc
@@ -42,13 +42,13 @@ bool VRDevice::IsPresentingService(VRServiceImpl* service) {
return (presenting_service_ && presenting_service_ == service);
}
-void VRDevice::OnDisplayChanged() {
+void VRDevice::OnChanged() {
mojom::VRDisplayInfoPtr vr_device_info = GetVRDevice();
if (vr_device_info.is_null())
return;
for (const auto& display : displays_)
- display.second->client()->OnDisplayChanged(vr_device_info.Clone());
+ display.second->client()->OnChanged(vr_device_info.Clone());
}
void VRDevice::OnExitPresent() {
@@ -59,14 +59,24 @@ void VRDevice::OnExitPresent() {
SetPresentingService(nullptr);
}
-void VRDevice::OnDisplayBlur() {
+void VRDevice::OnBlur() {
for (const auto& display : displays_)
- display.second->client()->OnDisplayBlur();
+ display.second->client()->OnBlur();
}
-void VRDevice::OnDisplayFocus() {
+void VRDevice::OnFocus() {
for (const auto& display : displays_)
- display.second->client()->OnDisplayFocus();
+ display.second->client()->OnFocus();
+}
+
+void VRDevice::OnActivate(mojom::VRDisplayEventReason reason) {
+ for (const auto& display : displays_)
+ display.second->client()->OnActivate(reason);
+}
+
+void VRDevice::OnDeactivate(mojom::VRDisplayEventReason reason) {
+ for (const auto& display : displays_)
+ display.second->client()->OnDeactivate(reason);
}
void VRDevice::SetPresentingService(VRServiceImpl* service) {
« no previous file with comments | « device/vr/vr_device.h ('k') | device/vr/vr_service.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698