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

Side by Side Diff: services/device/device_service.h

Issue 2589493006: Revert of Enable connection to Mojo services from Blink (Closed)
Patch Set: Created 3 years, 12 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 unified diff | Download patch
« no previous file with comments | « services/device/DEPS ('k') | services/device/device_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_DEVICE_DEVICE_SERVICE_H_ 5 #ifndef SERVICES_DEVICE_DEVICE_SERVICE_H_
6 #define SERVICES_DEVICE_DEVICE_SERVICE_H_ 6 #define SERVICES_DEVICE_DEVICE_SERVICE_H_
7 7
8 #include "base/callback_forward.h"
8 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
9 #include "device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom.h"
10 #include "mojo/public/cpp/bindings/binding_set.h" 10 #include "mojo/public/cpp/bindings/binding_set.h"
11 #include "services/service_manager/public/cpp/interface_factory.h" 11 #include "services/service_manager/public/cpp/interface_factory.h"
12 #include "services/service_manager/public/cpp/service.h" 12 #include "services/service_manager/public/cpp/service.h"
13 13
14 namespace device { 14 namespace device {
15 15
16 class TimeZoneMonitor;
17
18 std::unique_ptr<service_manager::Service> CreateDeviceService( 16 std::unique_ptr<service_manager::Service> CreateDeviceService(
19 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); 17 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner);
20 18
21 class DeviceService 19 class DeviceService : public service_manager::Service {
22 : public service_manager::Service,
23 public service_manager::InterfaceFactory<mojom::TimeZoneMonitor> {
24 public: 20 public:
25 DeviceService(scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); 21 explicit DeviceService(
22 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner);
26 ~DeviceService() override; 23 ~DeviceService() override;
27 24
28 private: 25 private:
29 // service_manager::Service: 26 // service_manager::Service:
30 void OnStart() override; 27 void OnStart() override;
31 bool OnConnect(const service_manager::ServiceInfo& remote_info, 28 bool OnConnect(const service_manager::ServiceInfo& remote_info,
32 service_manager::InterfaceRegistry* registry) override; 29 service_manager::InterfaceRegistry* registry) override;
33 30
34 // InterfaceFactory<mojom::TimeZoneMonitor>:
35 void Create(const service_manager::Identity& remote_identity,
36 mojom::TimeZoneMonitorRequest request) override;
37
38 std::unique_ptr<device::TimeZoneMonitor> time_zone_monitor_;
39 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; 31 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
40 32
41 DISALLOW_COPY_AND_ASSIGN(DeviceService); 33 DISALLOW_COPY_AND_ASSIGN(DeviceService);
42 }; 34 };
43 35
44 } // namespace device 36 } // namespace device
45 37
46 #endif // SERVICES_DEVICE_DEVICE_SERVICE_H_ 38 #endif // SERVICES_DEVICE_DEVICE_SERVICE_H_
OLDNEW
« no previous file with comments | « services/device/DEPS ('k') | services/device/device_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698