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 UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_ |
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 InputDeviceType type() const { return type_; } | 36 InputDeviceType type() const { return type_; } |
37 | 37 |
38 void set_ignore_events(bool ignore_events) { ignore_events_ = ignore_events; } | 38 void set_ignore_events(bool ignore_events) { ignore_events_ = ignore_events; } |
39 | 39 |
40 // Start reading events. | 40 // Start reading events. |
41 void Start(); | 41 void Start(); |
42 | 42 |
43 // Stop reading events. | 43 // Stop reading events. |
44 void Stop(); | 44 void Stop(); |
45 | 45 |
| 46 // Cleanup after we stop reading events (release buttons, etc). |
| 47 virtual void OnStopped(); |
| 48 |
46 // Returns true if the converter is used for a keyboard device. | 49 // Returns true if the converter is used for a keyboard device. |
47 virtual bool HasKeyboard() const; | 50 virtual bool HasKeyboard() const; |
48 | 51 |
49 // Returns true if the converter is used for a mouse device; | 52 // Returns true if the converter is used for a mouse device; |
50 virtual bool HasMouse() const; | 53 virtual bool HasMouse() const; |
51 | 54 |
52 // Returns true if the converter is used for a touchpad device. | 55 // Returns true if the converter is used for a touchpad device. |
53 virtual bool HasTouchpad() const; | 56 virtual bool HasTouchpad() const; |
54 | 57 |
55 // Returns true if the converter is used for a touchscreen device. | 58 // Returns true if the converter is used for a touchscreen device. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // Controller for watching the input fd. | 103 // Controller for watching the input fd. |
101 base::MessagePumpLibevent::FileDescriptorWatcher controller_; | 104 base::MessagePumpLibevent::FileDescriptorWatcher controller_; |
102 | 105 |
103 private: | 106 private: |
104 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdev); | 107 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdev); |
105 }; | 108 }; |
106 | 109 |
107 } // namespace ui | 110 } // namespace ui |
108 | 111 |
109 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_ | 112 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_ |
OLD | NEW |