| OLD | NEW |
| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // asynchronous (and we receive an XEvent when mapped), while there are also | 61 // asynchronous (and we receive an XEvent when mapped), while there are also |
| 62 // functions which require a mapped window. | 62 // functions which require a mapped window. |
| 63 void BlockUntilWindowMapped(XID window); | 63 void BlockUntilWindowMapped(XID window); |
| 64 | 64 |
| 65 void BlockUntilWindowUnmapped(XID window); | 65 void BlockUntilWindowUnmapped(XID window); |
| 66 | 66 |
| 67 XDisplay* display() { return display_; } | 67 XDisplay* display() { return display_; } |
| 68 Time last_seen_server_time() const { return last_seen_server_time_; } | 68 Time last_seen_server_time() const { return last_seen_server_time_; } |
| 69 | 69 |
| 70 // Explicitly asks the X11 server for the current timestamp, and updates | 70 // Explicitly asks the X11 server for the current timestamp, and updates |
| 71 // |last_seen_server_time| with this value. | 71 // |last_seen_server_time_| with this value. |
| 72 Time UpdateLastSeenServerTime(); | 72 Time UpdateLastSeenServerTime(); |
| 73 | 73 |
| 74 // Sets |last_seen_server_time_| to |time| if this would cause the time to |
| 75 // move forward. |
| 76 void SetLastSeenServerTime(Time time); |
| 77 |
| 74 void StopCurrentEventStream(); | 78 void StopCurrentEventStream(); |
| 75 void OnDispatcherListChanged(); | 79 void OnDispatcherListChanged(); |
| 76 | 80 |
| 77 protected: | 81 protected: |
| 78 // Extracts cookie data from |xevent| if it's of GenericType, and dispatches | 82 // Extracts cookie data from |xevent| if it's of GenericType, and dispatches |
| 79 // the event. This function also frees up the cookie data after dispatch is | 83 // the event. This function also frees up the cookie data after dispatch is |
| 80 // complete. | 84 // complete. |
| 81 void ExtractCookieDataDispatchEvent(XEvent* xevent); | 85 void ExtractCookieDataDispatchEvent(XEvent* xevent); |
| 82 | 86 |
| 83 // Handles updates after event has been dispatched. | 87 // Handles updates after event has been dispatched. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 108 bool continue_stream_ = true; | 112 bool continue_stream_ = true; |
| 109 | 113 |
| 110 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_; | 114 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_; |
| 111 | 115 |
| 112 DISALLOW_COPY_AND_ASSIGN(X11EventSource); | 116 DISALLOW_COPY_AND_ASSIGN(X11EventSource); |
| 113 }; | 117 }; |
| 114 | 118 |
| 115 } // namespace ui | 119 } // namespace ui |
| 116 | 120 |
| 117 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ | 121 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ |
| OLD | NEW |