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> |
| 11 |
10 #include "base/macros.h" | 12 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "ui/events/events_export.h" | 13 #include "ui/events/events_export.h" |
13 #include "ui/gfx/x/x11_types.h" | 14 #include "ui/gfx/x/x11_types.h" |
14 | 15 |
15 typedef union _XEvent XEvent; | 16 typedef union _XEvent XEvent; |
16 typedef unsigned long XID; | 17 typedef unsigned long XID; |
17 | 18 |
18 namespace ui { | 19 namespace ui { |
19 | 20 |
20 class X11HotplugEventHandler; | 21 class X11HotplugEventHandler; |
21 | 22 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 77 |
77 X11EventSourceDelegate* delegate_; | 78 X11EventSourceDelegate* delegate_; |
78 | 79 |
79 // The connection to the X11 server used to receive the events. | 80 // The connection to the X11 server used to receive the events. |
80 XDisplay* display_; | 81 XDisplay* display_; |
81 | 82 |
82 // Keeps track of whether this source should continue to dispatch all the | 83 // Keeps track of whether this source should continue to dispatch all the |
83 // available events. | 84 // available events. |
84 bool continue_stream_ = true; | 85 bool continue_stream_ = true; |
85 | 86 |
86 scoped_ptr<X11HotplugEventHandler> hotplug_event_handler_; | 87 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_; |
87 | 88 |
88 DISALLOW_COPY_AND_ASSIGN(X11EventSource); | 89 DISALLOW_COPY_AND_ASSIGN(X11EventSource); |
89 }; | 90 }; |
90 | 91 |
91 } // namespace ui | 92 } // namespace ui |
92 | 93 |
93 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ | 94 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ |
OLD | NEW |