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

Unified Diff: services/device/device_service.cc

Issue 2460723003: Enable connection to Mojo services from Blink (Closed)
Patch Set: Rebase 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
« no previous file with comments | « services/device/device_service.h ('k') | services/device/manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/device/device_service.cc
diff --git a/services/device/device_service.cc b/services/device/device_service.cc
index 924c8039e7f5244a80e167b2fb545dd500350941..27c020d1d42d39901ec9cc14c6682f6c350a5149 100644
--- a/services/device/device_service.cc
+++ b/services/device/device_service.cc
@@ -7,7 +7,10 @@
#include "base/bind.h"
#include "base/memory/ptr_util.h"
#include "base/memory/weak_ptr.h"
+#include "base/threading/thread_task_runner_handle.h"
+#include "device/time_zone_monitor/time_zone_monitor.h"
#include "services/service_manager/public/cpp/connection.h"
+#include "services/service_manager/public/cpp/interface_registry.h"
namespace device {
@@ -26,7 +29,15 @@ void DeviceService::OnStart() {}
bool DeviceService::OnConnect(const service_manager::ServiceInfo& remote_info,
service_manager::InterfaceRegistry* registry) {
+ registry->AddInterface<mojom::TimeZoneMonitor>(this);
return true;
}
+void DeviceService::Create(const service_manager::Identity& remote_identity,
+ mojom::TimeZoneMonitorRequest request) {
+ if (!time_zone_monitor_)
+ time_zone_monitor_ = device::TimeZoneMonitor::Create(file_task_runner_);
+ time_zone_monitor_->Bind(std::move(request));
+}
+
} // namespace device
« no previous file with comments | « services/device/device_service.h ('k') | services/device/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698