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

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

Issue 1723303002: Implement GLX for Ozone X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 8 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 #include "ui/events/platform/x11/x11_event_source_libevent.h" 5 #include "ui/events/platform/x11/x11_event_source_libevent.h"
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 9
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 } // namespace 130 } // namespace
131 131
132 X11EventSourceLibevent::X11EventSourceLibevent(XDisplay* display) 132 X11EventSourceLibevent::X11EventSourceLibevent(XDisplay* display)
133 : event_source_(this, display) { 133 : event_source_(this, display) {
134 AddEventWatcher(); 134 AddEventWatcher();
135 } 135 }
136 136
137 X11EventSourceLibevent::~X11EventSourceLibevent() {} 137 X11EventSourceLibevent::~X11EventSourceLibevent() {}
138 138
139 // static
140 X11EventSourceLibevent* X11EventSourceLibevent::GetInstance() {
141 return static_cast<X11EventSourceLibevent*>(
142 PlatformEventSource::GetInstance());
143 }
144
139 void X11EventSourceLibevent::AddXEventDispatcher(XEventDispatcher* dispatcher) { 145 void X11EventSourceLibevent::AddXEventDispatcher(XEventDispatcher* dispatcher) {
140 dispatchers_xevent_.AddObserver(dispatcher); 146 dispatchers_xevent_.AddObserver(dispatcher);
141 } 147 }
142 148
143 void X11EventSourceLibevent::RemoveXEventDispatcher( 149 void X11EventSourceLibevent::RemoveXEventDispatcher(
144 XEventDispatcher* dispatcher) { 150 XEventDispatcher* dispatcher) {
145 dispatchers_xevent_.RemoveObserver(dispatcher); 151 dispatchers_xevent_.RemoveObserver(dispatcher);
146 } 152 }
147 153
148 void X11EventSourceLibevent::ProcessXEvent(XEvent* xevent) { 154 void X11EventSourceLibevent::ProcessXEvent(XEvent* xevent) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 196
191 void X11EventSourceLibevent::OnFileCanReadWithoutBlocking(int fd) { 197 void X11EventSourceLibevent::OnFileCanReadWithoutBlocking(int fd) {
192 event_source_.DispatchXEvents(); 198 event_source_.DispatchXEvents();
193 } 199 }
194 200
195 void X11EventSourceLibevent::OnFileCanWriteWithoutBlocking(int fd) { 201 void X11EventSourceLibevent::OnFileCanWriteWithoutBlocking(int fd) {
196 NOTREACHED(); 202 NOTREACHED();
197 } 203 }
198 204
199 } // namespace ui 205 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698