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

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

Issue 2695593009: Use the location where FileDescriptorWatcher is created to track the libevent handlers (Closed)
Patch Set: fix mac. Created 3 years, 10 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 <memory> 10 #include <memory>
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 case GenericEvent: 127 case GenericEvent:
128 return TranslateXI2EventToEvent(xev); 128 return TranslateXI2EventToEvent(xev);
129 } 129 }
130 return nullptr; 130 return nullptr;
131 } 131 }
132 132
133 } // namespace 133 } // namespace
134 134
135 X11EventSourceLibevent::X11EventSourceLibevent(XDisplay* display) 135 X11EventSourceLibevent::X11EventSourceLibevent(XDisplay* display)
136 : event_source_(this, display) { 136 : event_source_(this, display), watcher_controller_(FROM_HERE) {
137 AddEventWatcher(); 137 AddEventWatcher();
138 } 138 }
139 139
140 X11EventSourceLibevent::~X11EventSourceLibevent() {} 140 X11EventSourceLibevent::~X11EventSourceLibevent() {}
141 141
142 // static 142 // static
143 X11EventSourceLibevent* X11EventSourceLibevent::GetInstance() { 143 X11EventSourceLibevent* X11EventSourceLibevent::GetInstance() {
144 return static_cast<X11EventSourceLibevent*>( 144 return static_cast<X11EventSourceLibevent*>(
145 PlatformEventSource::GetInstance()); 145 PlatformEventSource::GetInstance());
146 } 146 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 void X11EventSourceLibevent::OnFileCanReadWithoutBlocking(int fd) { 197 void X11EventSourceLibevent::OnFileCanReadWithoutBlocking(int fd) {
198 event_source_.DispatchXEvents(); 198 event_source_.DispatchXEvents();
199 } 199 }
200 200
201 void X11EventSourceLibevent::OnFileCanWriteWithoutBlocking(int fd) { 201 void X11EventSourceLibevent::OnFileCanWriteWithoutBlocking(int fd) {
202 NOTREACHED(); 202 NOTREACHED();
203 } 203 }
204 204
205 } // namespace ui 205 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/tablet_event_converter_evdev.cc ('k') | ui/ozone/platform/drm/gpu/drm_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698