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

Unified Diff: services/device/device_service.cc

Issue 2510033002: [Device Service] Move PowerMonitor into the Device Service (Closed)
Patch Set: Rebase only Created 3 years, 11 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 | « 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 27c020d1d42d39901ec9cc14c6682f6c350a5149..229695f19479593edfdeba9c5770079911bec358 100644
--- a/services/device/device_service.cc
+++ b/services/device/device_service.cc
@@ -8,6 +8,7 @@
#include "base/memory/ptr_util.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "device/power_monitor/power_monitor_message_broadcaster.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"
@@ -29,11 +30,17 @@ void DeviceService::OnStart() {}
bool DeviceService::OnConnect(const service_manager::ServiceInfo& remote_info,
service_manager::InterfaceRegistry* registry) {
+ registry->AddInterface<mojom::PowerMonitor>(this);
registry->AddInterface<mojom::TimeZoneMonitor>(this);
return true;
}
void DeviceService::Create(const service_manager::Identity& remote_identity,
+ mojom::PowerMonitorRequest request) {
+ PowerMonitorMessageBroadcaster::Create(std::move(request));
+}
+
+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_);
« 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