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

Unified Diff: device/vr/vr_service_impl.cc

Issue 2510993002: Notify VRDeviceProviders when there are pages listening for vrdisplayactivate (Closed)
Patch Set: Rebase 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_service_impl.h ('k') | third_party/WebKit/Source/modules/vr/NavigatorVR.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/vr_service_impl.cc
diff --git a/device/vr/vr_service_impl.cc b/device/vr/vr_service_impl.cc
index ad12ace4c8affb86b0ddca747b7a4eeb83811ea6..49ddde0482efb074ec3eb3977ea272730a3a817e 100644
--- a/device/vr/vr_service_impl.cc
+++ b/device/vr/vr_service_impl.cc
@@ -12,7 +12,7 @@
namespace device {
-VRServiceImpl::VRServiceImpl() {}
+VRServiceImpl::VRServiceImpl() : listening_for_activate_(false) {}
VRServiceImpl::~VRServiceImpl() {
RemoveFromDeviceManager();
@@ -67,4 +67,10 @@ void VRServiceImpl::SetClient(mojom::VRServiceClientPtr service_client,
callback.Run(device_manager->GetNumberOfConnectedDevices());
}
+void VRServiceImpl::SetListeningForActivate(bool listening) {
+ listening_for_activate_ = listening;
+ VRDeviceManager* device_manager = VRDeviceManager::GetInstance();
+ device_manager->ListeningForActivateChanged(listening);
+}
+
} // namespace device
« no previous file with comments | « device/vr/vr_service_impl.h ('k') | third_party/WebKit/Source/modules/vr/NavigatorVR.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698