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

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

Issue 1052273006: ozone: evdev: Make cancellation of repeats on key up more robust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge DispatchKeyRepeat Created 5 years, 8 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 | « no previous file | ui/events/ozone/evdev/keyboard_evdev.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/keyboard_evdev.h
diff --git a/ui/events/ozone/evdev/keyboard_evdev.h b/ui/events/ozone/evdev/keyboard_evdev.h
index 0560faa6f77126caabe50202f0c6d3002e5e6372..8b49ebb765bde7b0f6fb952944185c97219f71b6 100644
--- a/ui/events/ozone/evdev/keyboard_evdev.h
+++ b/ui/events/ozone/evdev/keyboard_evdev.h
@@ -53,8 +53,8 @@ class EVENTS_OZONE_EVDEV_EXPORT KeyboardEvdev {
void UpdateKeyRepeat(unsigned int key, bool down);
void StartKeyRepeat(unsigned int key);
void StopKeyRepeat();
- void OnRepeatDelayTimeout();
- void OnRepeatIntervalTimeout();
+ void ScheduleKeyRepeat(const base::TimeDelta& delay);
+ void OnRepeatTimeout(unsigned int sequence);
void DispatchKey(unsigned int key,
bool down,
bool repeat,
@@ -81,10 +81,11 @@ class EVENTS_OZONE_EVDEV_EXPORT KeyboardEvdev {
// Key repeat state.
bool repeat_enabled_;
unsigned int repeat_key_;
+ unsigned int repeat_sequence_;
base::TimeDelta repeat_delay_;
base::TimeDelta repeat_interval_;
- base::OneShotTimer<KeyboardEvdev> repeat_delay_timer_;
- base::RepeatingTimer<KeyboardEvdev> repeat_interval_timer_;
+
+ base::WeakPtrFactory<KeyboardEvdev> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(KeyboardEvdev);
};
« no previous file with comments | « no previous file | ui/events/ozone/evdev/keyboard_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698