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

Unified Diff: ui/events/ozone/evdev/event_converter_evdev_impl.h

Issue 985163002: ozone: evdev: Fix possibility of stuck keys (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/ozone/evdev/event_converter_evdev.cc ('k') | ui/events/ozone/evdev/event_converter_evdev_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/event_converter_evdev_impl.h
diff --git a/ui/events/ozone/evdev/event_converter_evdev_impl.h b/ui/events/ozone/evdev/event_converter_evdev_impl.h
index 76e867472a7bfd7ecf66c0fcd62c81116c51775f..b1277f53f2e41c8c48e82f0c625e35cd25ed8aaa 100644
--- a/ui/events/ozone/evdev/event_converter_evdev_impl.h
+++ b/ui/events/ozone/evdev/event_converter_evdev_impl.h
@@ -44,14 +44,18 @@ class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdevImpl
bool HasCapsLockLed() const override;
void SetAllowedKeys(scoped_ptr<std::set<DomCode>> allowed_keys) override;
void AllowAllKeys() override;
+ void OnStopped() override;
void ProcessEvents(const struct input_event* inputs, int count);
private:
void ConvertKeyEvent(const input_event& input);
-
void ConvertMouseMoveEvent(const input_event& input);
-
+ void OnKeyChange(unsigned int key,
+ bool down,
+ const base::TimeDelta& timestamp);
+ void ReleaseKeys();
+ void OnLostSync();
void DispatchMouseButton(const input_event& input);
// Flush events delimited by EV_SYN. This is useful for handling
@@ -78,6 +82,9 @@ class EVENTS_OZONE_EVDEV_EXPORT EventConverterEvdevImpl
// processed.
scoped_ptr<std::set<DomCode>> allowed_keys_;
+ // Pressed keys bitset.
+ std::bitset<KEY_CNT> key_state_;
+
// Shared cursor state.
CursorDelegateEvdev* cursor_;
« no previous file with comments | « ui/events/ozone/evdev/event_converter_evdev.cc ('k') | ui/events/ozone/evdev/event_converter_evdev_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698