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

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

Issue 1723303002: Implement GLX for Ozone X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to use #define Created 4 years, 3 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 | « content/gpu/gpu_main.cc ('k') | ui/events/platform/x11/x11_event_source_libevent.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_LIBEVENT_H_ 5 #ifndef UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_LIBEVENT_H_
6 #define UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_LIBEVENT_H_ 6 #define UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_LIBEVENT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_pump_libevent.h" 9 #include "base/message_loop/message_pump_libevent.h"
10 #include "ui/events/events_export.h" 10 #include "ui/events/events_export.h"
(...skipping 21 matching lines...) Expand all
32 // XEventDispatchers is maintained. Uses Libevent to be notified for incoming 32 // XEventDispatchers is maintained. Uses Libevent to be notified for incoming
33 // XEvents. 33 // XEvents.
34 class EVENTS_EXPORT X11EventSourceLibevent 34 class EVENTS_EXPORT X11EventSourceLibevent
35 : public X11EventSourceDelegate, 35 : public X11EventSourceDelegate,
36 public PlatformEventSource, 36 public PlatformEventSource,
37 public base::MessagePumpLibevent::Watcher { 37 public base::MessagePumpLibevent::Watcher {
38 public: 38 public:
39 explicit X11EventSourceLibevent(XDisplay* display); 39 explicit X11EventSourceLibevent(XDisplay* display);
40 ~X11EventSourceLibevent() override; 40 ~X11EventSourceLibevent() override;
41 41
42 static X11EventSourceLibevent* GetInstance();
43
42 // Adds a XEvent dispatcher to the XEvent dispatcher list. 44 // Adds a XEvent dispatcher to the XEvent dispatcher list.
43 void AddXEventDispatcher(XEventDispatcher* dispatcher); 45 void AddXEventDispatcher(XEventDispatcher* dispatcher);
44 46
45 // Removes a XEvent dispatcher fERrom the XEvent dispatcher list. 47 // Removes a XEvent dispatcher fERrom the XEvent dispatcher list.
46 void RemoveXEventDispatcher(XEventDispatcher* dispatcher); 48 void RemoveXEventDispatcher(XEventDispatcher* dispatcher);
47 49
48 // X11EventSourceDelegate: 50 // X11EventSourceDelegate:
49 void ProcessXEvent(XEvent* xevent) override; 51 void ProcessXEvent(XEvent* xevent) override;
50 52
51 private: 53 private:
(...skipping 18 matching lines...) Expand all
70 72
71 base::MessagePumpLibevent::FileDescriptorWatcher watcher_controller_; 73 base::MessagePumpLibevent::FileDescriptorWatcher watcher_controller_;
72 bool initialized_ = false; 74 bool initialized_ = false;
73 75
74 DISALLOW_COPY_AND_ASSIGN(X11EventSourceLibevent); 76 DISALLOW_COPY_AND_ASSIGN(X11EventSourceLibevent);
75 }; 77 };
76 78
77 } // namespace ui 79 } // namespace ui
78 80
79 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_LIBEVENT_H_ 81 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_LIBEVENT_H_
OLDNEW
« no previous file with comments | « content/gpu/gpu_main.cc ('k') | ui/events/platform/x11/x11_event_source_libevent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698