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

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

Issue 2004533002: mash: Fix mash in debug builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « ui/events/platform/x11/x11_event_source.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.h" 5 #include "ui/events/platform/x11/x11_event_source.h"
6 6
7 #include <X11/Xatom.h> 7 #include <X11/Xatom.h>
8 #include <X11/XKBlib.h> 8 #include <X11/XKBlib.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 InitializeXkb(display_); 107 InitializeXkb(display_);
108 } 108 }
109 109
110 X11EventSource::~X11EventSource() { 110 X11EventSource::~X11EventSource() {
111 DCHECK_EQ(this, instance_); 111 DCHECK_EQ(this, instance_);
112 instance_ = nullptr; 112 instance_ = nullptr;
113 if (dummy_initialized_) 113 if (dummy_initialized_)
114 XDestroyWindow(display_, dummy_window_); 114 XDestroyWindow(display_, dummy_window_);
115 } 115 }
116 116
117 bool X11EventSource::HasInstance() {
118 return instance_;
119 }
120
117 // static 121 // static
118 X11EventSource* X11EventSource::GetInstance() { 122 X11EventSource* X11EventSource::GetInstance() {
119 DCHECK(instance_); 123 DCHECK(instance_);
120 return instance_; 124 return instance_;
121 } 125 }
122 126
123 //////////////////////////////////////////////////////////////////////////////// 127 ////////////////////////////////////////////////////////////////////////////////
124 // X11EventSource, public 128 // X11EventSource, public
125 129
126 void X11EventSource::DispatchXEvents() { 130 void X11EventSource::DispatchXEvents() {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 231
228 void X11EventSource::OnDispatcherListChanged() { 232 void X11EventSource::OnDispatcherListChanged() {
229 if (!hotplug_event_handler_) { 233 if (!hotplug_event_handler_) {
230 hotplug_event_handler_.reset(new X11HotplugEventHandler()); 234 hotplug_event_handler_.reset(new X11HotplugEventHandler());
231 // Force the initial device query to have an update list of active devices. 235 // Force the initial device query to have an update list of active devices.
232 hotplug_event_handler_->OnHotplugEvent(); 236 hotplug_event_handler_->OnHotplugEvent();
233 } 237 }
234 } 238 }
235 239
236 } // namespace ui 240 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/platform/x11/x11_event_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698