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

Unified Diff: device/vr/vr_display_impl.cc

Issue 2783993002: Send vrdisplayactivate to the most recently focused navigator listening for displayactivate. (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
« no previous file with comments | « device/vr/vr_device_manager.cc ('k') | device/vr/vr_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/vr_display_impl.cc
diff --git a/device/vr/vr_display_impl.cc b/device/vr/vr_display_impl.cc
index b462ebc943dbd1d2998edb6f393d83df256aa211..28f12176e68daa97ea9c932e723caf9dfc3953d7 100644
--- a/device/vr/vr_display_impl.cc
+++ b/device/vr/vr_display_impl.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "device/vr/vr_device.h"
+#include "device/vr/vr_device_manager.h"
#include "device/vr/vr_service_impl.h"
namespace device {
@@ -45,6 +46,9 @@ void VRDisplayImpl::OnFocus() {
}
void VRDisplayImpl::OnActivate(mojom::VRDisplayEventReason reason) {
+ VRDeviceManager* manager = VRDeviceManager::GetInstance();
+ if (!manager->IsMostRecentlyListeningForActivate(service_))
+ return;
client_->OnActivate(reason);
}
« no previous file with comments | « device/vr/vr_device_manager.cc ('k') | device/vr/vr_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698