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 "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 const base::FilePath& path() const { return path_; } | 29 const base::FilePath& path() const { return path_; } |
30 | 30 |
31 InputDeviceType type() const { return type_; } | 31 InputDeviceType type() const { return type_; } |
32 | 32 |
33 // Start reading events. | 33 // Start reading events. |
34 void Start(); | 34 void Start(); |
35 | 35 |
36 // Stop reading events. | 36 // Stop reading events. |
37 void Stop(); | 37 void Stop(); |
38 | 38 |
| 39 // Returns true of the converter is used for a keyboard device. |
| 40 virtual bool HasKeyboard() const; |
| 41 |
39 // Returns true of the converter is used for a touchscreen device. | 42 // Returns true of the converter is used for a touchscreen device. |
40 virtual bool HasTouchscreen() const; | 43 virtual bool HasTouchscreen() const; |
41 | 44 |
42 // Returns the size of the touchscreen device if the converter is used for a | 45 // Returns the size of the touchscreen device if the converter is used for a |
43 // touchscreen device. | 46 // touchscreen device. |
44 virtual gfx::Size GetTouchscreenSize() const; | 47 virtual gfx::Size GetTouchscreenSize() const; |
45 | 48 |
46 protected: | 49 protected: |
47 // base::MessagePumpLibevent::Watcher: | 50 // base::MessagePumpLibevent::Watcher: |
48 void OnFileCanWriteWithoutBlocking(int fd) override; | 51 void OnFileCanWriteWithoutBlocking(int fd) override; |
(...skipping 13 matching lines...) Expand all Loading... |
62 // Controller for watching the input fd. | 65 // Controller for watching the input fd. |
63 base::MessagePumpLibevent::FileDescriptorWatcher controller_; | 66 base::MessagePumpLibevent::FileDescriptorWatcher controller_; |
64 | 67 |
65 private: | 68 private: |
66 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdev); | 69 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdev); |
67 }; | 70 }; |
68 | 71 |
69 } // namespace ui | 72 } // namespace ui |
70 | 73 |
71 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_ | 74 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_ |
OLD | NEW |