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 afc05882bf2c65859061438957a8af5cdbb46d54..1018caeeeb5559880eb1b625ac6c9469b3da2436 100644 |
--- a/ui/events/platform/x11/x11_event_source.h |
+++ b/ui/events/platform/x11/x11_event_source.h |
@@ -13,8 +13,9 @@ |
#include "ui/events/events_export.h" |
#include "ui/gfx/x/x11_types.h" |
-typedef union _XEvent XEvent; |
-typedef unsigned long XID; |
+using Time = unsigned long; |
+using XEvent = union _XEvent; |
+using XID = unsigned long; |
namespace ui { |
@@ -59,6 +60,7 @@ class EVENTS_EXPORT X11EventSource { |
void BlockUntilWindowMapped(XID window); |
XDisplay* display() { return display_; } |
+ Time last_seen_server_time() const { return last_seen_server_time_; } |
void StopCurrentEventStream(); |
void OnDispatcherListChanged(); |
@@ -73,6 +75,8 @@ class EVENTS_EXPORT X11EventSource { |
void PostDispatchEvent(XEvent* xevent); |
private: |
+ Time ExtractTimeFromXEvent(const XEvent& xevent); |
+ |
static X11EventSource* instance_; |
X11EventSourceDelegate* delegate_; |
@@ -80,6 +84,9 @@ class EVENTS_EXPORT X11EventSource { |
// The connection to the X11 server used to receive the events. |
XDisplay* display_; |
+ // The last timestamp seen in an XEvent. |
+ Time last_seen_server_time_; |
+ |
// Keeps track of whether this source should continue to dispatch all the |
// available events. |
bool continue_stream_ = true; |