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

Unified Diff: services/device/device_service.cc

Issue 2603553002: Ports VRService to be hosted in the device service.
Patch Set: Ports VRService to be hosted in the device service. Created 4 years 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: services/device/device_service.cc
diff --git a/services/device/device_service.cc b/services/device/device_service.cc
index 27c020d1d42d39901ec9cc14c6682f6c350a5149..2dc03d0e764f27127165db65339a6db993b83d2b 100644
--- a/services/device/device_service.cc
+++ b/services/device/device_service.cc
@@ -12,6 +12,10 @@
#include "services/service_manager/public/cpp/connection.h"
#include "services/service_manager/public/cpp/interface_registry.h"
+#if defined(ENABLE_WEBVR)
+#include "device/vr/vr_service_impl.h" //nogncheck
+#endif
+
namespace device {
std::unique_ptr<service_manager::Service> CreateDeviceService(
@@ -30,6 +34,9 @@ void DeviceService::OnStart() {}
bool DeviceService::OnConnect(const service_manager::ServiceInfo& remote_info,
service_manager::InterfaceRegistry* registry) {
registry->AddInterface<mojom::TimeZoneMonitor>(this);
+#if defined(ENABLE_WEBVR)
+ registry->AddInterface<mojom::VRService>(this);
+#endif
return true;
}
@@ -40,4 +47,11 @@ void DeviceService::Create(const service_manager::Identity& remote_identity,
time_zone_monitor_->Bind(std::move(request));
}
+#if defined(ENABLE_WEBVR)
+void DeviceService::Create(const service_manager::Identity& remote_identity,
+ mojom::VRServiceRequest request) {
+ device::VRServiceImpl::Create(std::move(request));
+}
+#endif
+
} // namespace device

Powered by Google App Engine
This is Rietveld 408576698