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

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: Change kAtomStr, fix formatting 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
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 Time UpdateServerTime();
sky 2016/05/07 16:58:34 Add description.
Tom (Use chromium acct) 2016/05/09 17:50:00 Done.
66
65 void StopCurrentEventStream(); 67 void StopCurrentEventStream();
66 void OnDispatcherListChanged(); 68 void OnDispatcherListChanged();
67 69
68 protected: 70 protected:
69 // Extracts cookie data from |xevent| if it's of GenericType, and dispatches 71 // 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 72 // the event. This function also frees up the cookie data after dispatch is
71 // complete. 73 // complete.
72 void ExtractCookieDataDispatchEvent(XEvent* xevent); 74 void ExtractCookieDataDispatchEvent(XEvent* xevent);
73 75
74 // Handles updates after event has been dispatched. 76 // Handles updates after event has been dispatched.
(...skipping 15 matching lines...) Expand all
90 bool continue_stream_ = true; 92 bool continue_stream_ = true;
91 93
92 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_; 94 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_;
93 95
94 DISALLOW_COPY_AND_ASSIGN(X11EventSource); 96 DISALLOW_COPY_AND_ASSIGN(X11EventSource);
95 }; 97 };
96 98
97 } // namespace ui 99 } // namespace ui
98 100
99 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ 101 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698