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

Unified Diff: ui/events/platform/x11/x11_event_source.h

Issue 2165083002: Linux: Refactor X11DesktopHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT Created 4 years, 4 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/devices/x11/touch_factory_x11.cc ('k') | ui/events/platform/x11/x11_event_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/platform/x11/x11_event_source.h
diff --git a/ui/events/platform/x11/x11_event_source.h b/ui/events/platform/x11/x11_event_source.h
index abfd5fa80c3f3857a0e17892ea03ae7785a60050..81c9b171dae21bf311f1e53fe069aa27417caa1a 100644
--- a/ui/events/platform/x11/x11_event_source.h
+++ b/ui/events/platform/x11/x11_event_source.h
@@ -73,9 +73,18 @@ class EVENTS_EXPORT X11EventSource {
Time last_seen_server_time() const { return last_seen_server_time_; }
// Explicitly asks the X11 server for the current timestamp, and updates
- // |last_seen_server_time| with this value.
+ // |last_seen_server_time_| with this value.
Time UpdateLastSeenServerTime();
+ // Sets |last_seen_server_time_| to |time| if this would cause the time to
+ // move forward.
+ void SetLastSeenServerTime(Time time);
+
+ // Returns the timestamp of the event currently being dispatched. Falls back
+ // on UpdateLastSeenServerTime() if there's no event being dispatched, or if
+ // the current event does not have a timestamp.
+ Time GetTimestamp();
+
void StopCurrentEventStream();
void OnDispatcherListChanged();
@@ -103,6 +112,9 @@ class EVENTS_EXPORT X11EventSource {
// The last timestamp seen in an XEvent.
Time last_seen_server_time_;
+ // The timestamp of the event being dispatched.
+ Time event_timestamp_;
+
// State necessary for UpdateLastSeenServerTime
bool dummy_initialized_;
XWindow dummy_window_;
« no previous file with comments | « ui/events/devices/x11/touch_factory_x11.cc ('k') | ui/events/platform/x11/x11_event_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698