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

Unified Diff: services/device/device_service.h

Issue 2460723003: Enable connection to Mojo services from Blink (Closed)
Patch Set: Response to reviews 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.h
diff --git a/services/device/device_service.h b/services/device/device_service.h
index 6f55953f91b6b2e5fcb28bf961d7c7fc3e327399..cea6c11f23dcb61ea573c6b5bb50b95de4b73274 100644
--- a/services/device/device_service.h
+++ b/services/device/device_service.h
@@ -5,21 +5,24 @@
#ifndef SERVICES_DEVICE_DEVICE_SERVICE_H_
#define SERVICES_DEVICE_DEVICE_SERVICE_H_
-#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
+#include "device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "services/service_manager/public/cpp/interface_factory.h"
#include "services/service_manager/public/cpp/service.h"
namespace device {
+class TimeZoneMonitor;
+
std::unique_ptr<service_manager::Service> CreateDeviceService(
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner);
-class DeviceService : public service_manager::Service {
+class DeviceService
+ : public service_manager::Service,
+ public service_manager::InterfaceFactory<mojom::TimeZoneMonitor> {
public:
- explicit DeviceService(
- scoped_refptr<base::SingleThreadTaskRunner> file_task_runner);
+ DeviceService(scoped_refptr<base::SingleThreadTaskRunner> file_task_runner);
~DeviceService() override;
private:
@@ -28,6 +31,11 @@ class DeviceService : public service_manager::Service {
bool OnConnect(const service_manager::ServiceInfo& remote_info,
service_manager::InterfaceRegistry* registry) override;
+ // InterfaceFactory<mojom::TimeZoneMonitor>:
+ void Create(const service_manager::Identity& remote_identity,
+ mojom::TimeZoneMonitorRequest request) override;
+
+ std::unique_ptr<device::TimeZoneMonitor> time_zone_monitor_;
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
DISALLOW_COPY_AND_ASSIGN(DeviceService);

Powered by Google App Engine
This is Rietveld 408576698