Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: ui/events/ozone/evdev/event_converter_evdev.h

Issue 2827803002: Make Interaction Media Features MQ dynamic on Linux. (Closed)
Patch Set: Patch for landing, added the mojo bits Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // Start reading events. 46 // Start reading events.
47 void Start(); 47 void Start();
48 48
49 // Stop reading events. 49 // Stop reading events.
50 void Stop(); 50 void Stop();
51 51
52 // Enable or disable this device. A disabled device still polls for 52 // Enable or disable this device. A disabled device still polls for
53 // input and can update state but must not dispatch any events to UI. 53 // input and can update state but must not dispatch any events to UI.
54 void SetEnabled(bool enabled); 54 void SetEnabled(bool enabled);
55 55
56 bool IsEnabled() const;
57
56 // Cleanup after we stop reading events (release buttons, etc). 58 // Cleanup after we stop reading events (release buttons, etc).
57 virtual void OnStopped(); 59 virtual void OnStopped();
58 60
59 // Prepare for disable (e.g. should release keys/buttons/touches). 61 // Prepare for disable (e.g. should release keys/buttons/touches).
60 virtual void OnDisabled(); 62 virtual void OnDisabled();
61 63
62 // Start or restart (e.g. should reapply keys/buttons/touches). 64 // Start or restart (e.g. should reapply keys/buttons/touches).
63 virtual void OnEnabled(); 65 virtual void OnEnabled();
64 66
65 // Dump recent events into a file. 67 // Dump recent events into a file.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // Path to input device. 124 // Path to input device.
123 base::FilePath path_; 125 base::FilePath path_;
124 126
125 // Input device information, including id (which uniquely identifies an 127 // Input device information, including id (which uniquely identifies an
126 // event converter) and type. 128 // event converter) and type.
127 InputDevice input_device_; 129 InputDevice input_device_;
128 130
129 // Whether we're polling for input on the device. 131 // Whether we're polling for input on the device.
130 bool watching_ = false; 132 bool watching_ = false;
131 133
132 // Whether events should be dispatched to UI.
133 bool enabled_ = false;
134
135 // Controller for watching the input fd. 134 // Controller for watching the input fd.
136 base::MessagePumpLibevent::FileDescriptorWatcher controller_; 135 base::MessagePumpLibevent::FileDescriptorWatcher controller_;
137 136
138 private: 137 private:
139 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdev); 138 DISALLOW_COPY_AND_ASSIGN(EventConverterEvdev);
140 }; 139 };
141 140
142 } // namespace ui 141 } // namespace ui
143 142
144 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_ 143 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_CONVERTER_EVDEV_H_
OLDNEW
« no previous file with comments | « ui/events/devices/mojo/input_devices.mojom ('k') | ui/events/ozone/evdev/event_converter_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698