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_IMPL_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_ |
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdevImpl | 26 class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdevImpl |
27 : public EventConverterEvdev { | 27 : public EventConverterEvdev { |
28 public: | 28 public: |
29 EventConverterEvdevImpl( | 29 EventConverterEvdevImpl( |
30 int fd, | 30 int fd, |
31 base::FilePath path, | 31 base::FilePath path, |
32 int id, | 32 int id, |
33 InputDeviceType type, | 33 InputDeviceType type, |
34 const EventDeviceInfo& info, | 34 const EventDeviceInfo& info, |
35 EventModifiersEvdev* modifiers, | |
36 CursorDelegateEvdev* cursor, | 35 CursorDelegateEvdev* cursor, |
37 const KeyEventDispatchCallback& key_callback, | 36 const KeyEventDispatchCallback& key_callback, |
38 const MouseMoveEventDispatchCallback& mouse_move_callback, | 37 const MouseMoveEventDispatchCallback& mouse_move_callback, |
39 const MouseButtonEventDispatchCallback& mouse_button_callback); | 38 const MouseButtonEventDispatchCallback& mouse_button_callback); |
40 ~EventConverterEvdevImpl() override; | 39 ~EventConverterEvdevImpl() override; |
41 | 40 |
42 // EventConverterEvdev: | 41 // EventConverterEvdev: |
43 void OnFileCanReadWithoutBlocking(int fd) override; | 42 void OnFileCanReadWithoutBlocking(int fd) override; |
44 bool HasKeyboard() const override; | 43 bool HasKeyboard() const override; |
45 bool HasTouchpad() const override; | 44 bool HasTouchpad() const override; |
(...skipping 26 matching lines...) Expand all Loading... |
72 // Controller for watching the input fd. | 71 // Controller for watching the input fd. |
73 base::MessagePumpLibevent::FileDescriptorWatcher controller_; | 72 base::MessagePumpLibevent::FileDescriptorWatcher controller_; |
74 | 73 |
75 // The keys which should be processed. nullptr if all keys should be | 74 // The keys which should be processed. nullptr if all keys should be |
76 // processed. | 75 // processed. |
77 scoped_ptr<std::set<DomCode>> allowed_keys_; | 76 scoped_ptr<std::set<DomCode>> allowed_keys_; |
78 | 77 |
79 // Shared cursor state. | 78 // Shared cursor state. |
80 CursorDelegateEvdev* cursor_; | 79 CursorDelegateEvdev* cursor_; |
81 | 80 |
82 // Modifier key state (shift, ctrl, etc). | |
83 EventModifiersEvdev* modifiers_; | |
84 | |
85 // Callbacks for dispatching events. | 81 // Callbacks for dispatching events. |
86 KeyEventDispatchCallback key_callback_; | 82 KeyEventDispatchCallback key_callback_; |
87 MouseMoveEventDispatchCallback mouse_move_callback_; | 83 MouseMoveEventDispatchCallback mouse_move_callback_; |
88 MouseButtonEventDispatchCallback mouse_button_callback_; | 84 MouseButtonEventDispatchCallback mouse_button_callback_; |
89 | 85 |
90 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdevImpl); | 86 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdevImpl); |
91 }; | 87 }; |
92 | 88 |
93 } // namespace ui | 89 } // namespace ui |
94 | 90 |
95 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_ | 91 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_IMPL_H_ |
96 | 92 |
OLD | NEW |