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

Side by Side Diff: ui/events/platform/x11/x11_event_source.h

Issue 1949393007: X11: Better timestamp handling for _NET_ACTIVE_WINDOW (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor Created 4 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
« no previous file with comments | « tools/metrics/histograms/histograms.xml ('k') | ui/events/platform/x11/x11_event_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PLATFORM_X11_X11_EVENT_SOURCE_H_ 5 #ifndef UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_
6 #define UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ 6 #define UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // For those that know X11, this is really a wrapper around XWindowEvent 55 // For those that know X11, this is really a wrapper around XWindowEvent
56 // which still makes sure the preempted event is dispatched instead of 56 // which still makes sure the preempted event is dispatched instead of
57 // dropped on the floor. This method exists because mapping a window is 57 // dropped on the floor. This method exists because mapping a window is
58 // asynchronous (and we receive an XEvent when mapped), while there are also 58 // asynchronous (and we receive an XEvent when mapped), while there are also
59 // functions which require a mapped window. 59 // functions which require a mapped window.
60 void BlockUntilWindowMapped(XID window); 60 void BlockUntilWindowMapped(XID window);
61 61
62 XDisplay* display() { return display_; } 62 XDisplay* display() { return display_; }
63 Time last_seen_server_time() const { return last_seen_server_time_; } 63 Time last_seen_server_time() const { return last_seen_server_time_; }
64 64
65 // Explicitly asks the X11 server for the current timestamp, and updates
66 // last_seen_server_time with this value.
sky 2016/05/12 15:01:16 nit: generally when referring to fields and parame
67 Time UpdateLastSeenServerTime();
68
65 void StopCurrentEventStream(); 69 void StopCurrentEventStream();
66 void OnDispatcherListChanged(); 70 void OnDispatcherListChanged();
67 71
68 protected: 72 protected:
69 // Extracts cookie data from |xevent| if it's of GenericType, and dispatches 73 // Extracts cookie data from |xevent| if it's of GenericType, and dispatches
70 // the event. This function also frees up the cookie data after dispatch is 74 // the event. This function also frees up the cookie data after dispatch is
71 // complete. 75 // complete.
72 void ExtractCookieDataDispatchEvent(XEvent* xevent); 76 void ExtractCookieDataDispatchEvent(XEvent* xevent);
73 77
74 // Handles updates after event has been dispatched. 78 // Handles updates after event has been dispatched.
(...skipping 15 matching lines...) Expand all
90 bool continue_stream_ = true; 94 bool continue_stream_ = true;
91 95
92 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_; 96 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_;
93 97
94 DISALLOW_COPY_AND_ASSIGN(X11EventSource); 98 DISALLOW_COPY_AND_ASSIGN(X11EventSource);
95 }; 99 };
96 100
97 } // namespace ui 101 } // namespace ui
98 102
99 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ 103 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_
OLDNEW
« no previous file with comments | « tools/metrics/histograms/histograms.xml ('k') | ui/events/platform/x11/x11_event_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698