| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 DEVICE_HID_HID_SERVICE_LINUX_H_ | 5 #ifndef DEVICE_HID_HID_SERVICE_LINUX_H_ |
| 6 #define DEVICE_HID_HID_SERVICE_LINUX_H_ | 6 #define DEVICE_HID_HID_SERVICE_LINUX_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/files/scoped_file.h" | 11 #include "base/files/scoped_file.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 15 #include "device/hid/hid_device_info.h" | 15 #include "device/hid/hid_device_info.h" |
| 16 #include "device/hid/hid_service.h" | 16 #include "device/hid/hid_service.h" |
| 17 | 17 |
| 18 namespace device { | 18 namespace device { |
| 19 | 19 |
| 20 class HidConnection; | |
| 21 | |
| 22 class HidServiceLinux : public HidService { | 20 class HidServiceLinux : public HidService { |
| 23 public: | 21 public: |
| 24 HidServiceLinux(scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); | 22 HidServiceLinux(scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); |
| 25 ~HidServiceLinux() override; | 23 ~HidServiceLinux() override; |
| 26 | 24 |
| 27 // HidService: | 25 // HidService: |
| 28 void Shutdown() override; | 26 void Shutdown() override; |
| 29 void Connect(const HidDeviceId& device_id, | 27 void Connect(const HidDeviceId& device_id, |
| 30 const ConnectCallback& callback) override; | 28 const ConnectCallback& callback) override; |
| 31 | 29 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 57 // service that owns it. | 55 // service that owns it. |
| 58 std::unique_ptr<FileThreadHelper> helper_; | 56 std::unique_ptr<FileThreadHelper> helper_; |
| 59 base::WeakPtrFactory<HidServiceLinux> weak_factory_; | 57 base::WeakPtrFactory<HidServiceLinux> weak_factory_; |
| 60 | 58 |
| 61 DISALLOW_COPY_AND_ASSIGN(HidServiceLinux); | 59 DISALLOW_COPY_AND_ASSIGN(HidServiceLinux); |
| 62 }; | 60 }; |
| 63 | 61 |
| 64 } // namespace device | 62 } // namespace device |
| 65 | 63 |
| 66 #endif // DEVICE_HID_HID_SERVICE_LINUX_H_ | 64 #endif // DEVICE_HID_HID_SERVICE_LINUX_H_ |
| OLD | NEW |