[email protected] | 26958d1 | 2014-02-27 17:29:10 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
[email protected] | 125724f | 2014-01-31 20:13:23 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef DEVICE_HID_HID_SERVICE_LINUX_H_ | ||||
6 | #define DEVICE_HID_HID_SERVICE_LINUX_H_ | ||||
7 | |||||
[email protected] | bca53b0 | 2014-04-10 15:11:14 | [diff] [blame^] | 8 | #include "base/compiler_specific.h" |
[email protected] | 125724f | 2014-01-31 20:13:23 | [diff] [blame] | 9 | #include "base/macros.h" |
[email protected] | bca53b0 | 2014-04-10 15:11:14 | [diff] [blame^] | 10 | #include "device/hid/device_monitor_linux.h" |
[email protected] | 125724f | 2014-01-31 20:13:23 | [diff] [blame] | 11 | #include "device/hid/hid_device_info.h" |
12 | #include "device/hid/hid_service.h" | ||||
13 | |||||
[email protected] | bca53b0 | 2014-04-10 15:11:14 | [diff] [blame^] | 14 | struct udev_device; |
15 | |||||
[email protected] | 125724f | 2014-01-31 20:13:23 | [diff] [blame] | 16 | namespace device { |
17 | |||||
18 | class HidConnection; | ||||
19 | |||||
[email protected] | 125724f | 2014-01-31 20:13:23 | [diff] [blame] | 20 | class HidServiceLinux : public HidService, |
[email protected] | bca53b0 | 2014-04-10 15:11:14 | [diff] [blame^] | 21 | public DeviceMonitorLinux::Observer { |
[email protected] | 125724f | 2014-01-31 20:13:23 | [diff] [blame] | 22 | public: |
23 | HidServiceLinux(); | ||||
24 | |||||
[email protected] | 26958d1 | 2014-02-27 17:29:10 | [diff] [blame] | 25 | virtual scoped_refptr<HidConnection> Connect(const HidDeviceId& device_id) |
26 | OVERRIDE; | ||||
[email protected] | 125724f | 2014-01-31 20:13:23 | [diff] [blame] | 27 | |
[email protected] | bca53b0 | 2014-04-10 15:11:14 | [diff] [blame^] | 28 | // Implements base::DeviceMonitorLinux::Observer: |
29 | virtual void OnDeviceAdded(udev_device* device) OVERRIDE; | ||||
30 | virtual void OnDeviceRemoved(udev_device* device) OVERRIDE; | ||||
[email protected] | 125724f | 2014-01-31 20:13:23 | [diff] [blame] | 31 | |
32 | private: | ||||
33 | virtual ~HidServiceLinux(); | ||||
34 | |||||
[email protected] | 125724f | 2014-01-31 20:13:23 | [diff] [blame] | 35 | DISALLOW_COPY_AND_ASSIGN(HidServiceLinux); |
36 | }; | ||||
37 | |||||
38 | } // namespace device | ||||
39 | |||||
40 | #endif // DEVICE_HID_HID_SERVICE_LINUX_H_ |