| 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_INPUT_SERVICE_LINUX_H_ | 5 #ifndef DEVICE_HID_INPUT_SERVICE_LINUX_H_ |
| 6 #define DEVICE_HID_INPUT_SERVICE_LINUX_H_ | 6 #define DEVICE_HID_INPUT_SERVICE_LINUX_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 ~InputServiceLinux() override; | 60 ~InputServiceLinux() override; |
| 61 | 61 |
| 62 static InputServiceLinux* GetInstance(); | 62 static InputServiceLinux* GetInstance(); |
| 63 static bool HasInstance(); | 63 static bool HasInstance(); |
| 64 static void SetForTesting(InputServiceLinux* service); | 64 static void SetForTesting(InputServiceLinux* service); |
| 65 | 65 |
| 66 void AddObserver(Observer* observer); | 66 void AddObserver(Observer* observer); |
| 67 void RemoveObserver(Observer* observer); | 67 void RemoveObserver(Observer* observer); |
| 68 | 68 |
| 69 // Returns list of all currently connected input/hid devices. | 69 // Returns list of all currently connected input/hid devices. |
| 70 void GetDevices(std::vector<InputDeviceInfo>* devices); | 70 virtual void GetDevices(std::vector<InputDeviceInfo>* devices); |
| 71 | 71 |
| 72 // Returns an info about input device identified by |id|. When there're | 72 // Returns an info about input device identified by |id|. When there're |
| 73 // no input or hid device with such id, returns false and doesn't | 73 // no input or hid device with such id, returns false and doesn't |
| 74 // modify |info|. | 74 // modify |info|. |
| 75 bool GetDeviceInfo(const std::string& id, InputDeviceInfo* info) const; | 75 bool GetDeviceInfo(const std::string& id, InputDeviceInfo* info) const; |
| 76 | 76 |
| 77 // Implements base::MessageLoop::DestructionObserver | 77 // Implements base::MessageLoop::DestructionObserver |
| 78 void WillDestroyCurrentMessageLoop() override; | 78 void WillDestroyCurrentMessageLoop() override; |
| 79 | 79 |
| 80 protected: | 80 protected: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 91 friend std::default_delete<InputServiceLinux>; | 91 friend std::default_delete<InputServiceLinux>; |
| 92 | 92 |
| 93 base::ThreadChecker thread_checker_; | 93 base::ThreadChecker thread_checker_; |
| 94 | 94 |
| 95 DISALLOW_COPY_AND_ASSIGN(InputServiceLinux); | 95 DISALLOW_COPY_AND_ASSIGN(InputServiceLinux); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace device | 98 } // namespace device |
| 99 | 99 |
| 100 #endif // DEVICE_HID_INPUT_SERVICE_LINUX_H_ | 100 #endif // DEVICE_HID_INPUT_SERVICE_LINUX_H_ |
| OLD | NEW |