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

Side by Side Diff: base/message_pump_x.cc

Issue 8143021: aura: Fix views_unittests on linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed textfield tests changes Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/aura/aura.gyp » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/message_pump_x.h" 5 #include "base/message_pump_x.h"
6 6
7 #include <X11/extensions/XInput2.h> 7 #include <X11/extensions/XInput2.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 161
162 // static 162 // static
163 bool MessagePumpX::HasXInput2() { 163 bool MessagePumpX::HasXInput2() {
164 return xiopcode != -1; 164 return xiopcode != -1;
165 } 165 }
166 166
167 void MessagePumpX::InitXSource() { 167 void MessagePumpX::InitXSource() {
168 DCHECK(!x_source_); 168 DCHECK(!x_source_);
169 GPollFD* x_poll = new GPollFD(); 169 GPollFD* x_poll = new GPollFD();
170 x_poll->fd = ConnectionNumber(g_xdisplay); 170 x_poll->fd = ConnectionNumber(GetDefaultXDisplay());
171 x_poll->events = G_IO_IN; 171 x_poll->events = G_IO_IN;
172 172
173 x_source_ = g_source_new(&XSourceFuncs, sizeof(GSource)); 173 x_source_ = g_source_new(&XSourceFuncs, sizeof(GSource));
174 g_source_add_poll(x_source_, x_poll); 174 g_source_add_poll(x_source_, x_poll);
175 g_source_set_can_recurse(x_source_, FALSE); 175 g_source_set_can_recurse(x_source_, FALSE);
176 g_source_attach(x_source_, g_main_context_default()); 176 g_source_attach(x_source_, g_main_context_default());
177 } 177 }
178 178
179 bool MessagePumpX::ShouldCaptureXEvent(XEvent* xev) { 179 bool MessagePumpX::ShouldCaptureXEvent(XEvent* xev) {
180 return 180 return
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 capture_gdk_events_[GDK_MOTION_NOTIFY] = true; 331 capture_gdk_events_[GDK_MOTION_NOTIFY] = true;
332 332
333 capture_x_events_[GenericEvent] = true; 333 capture_x_events_[GenericEvent] = true;
334 } 334 }
335 335
336 COMPILE_ASSERT(XLASTEvent >= LASTEvent, XLASTEvent_too_small); 336 COMPILE_ASSERT(XLASTEvent >= LASTEvent, XLASTEvent_too_small);
337 337
338 #endif // defined(TOOLKIT_USES_GTK) 338 #endif // defined(TOOLKIT_USES_GTK)
339 339
340 } // namespace base 340 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | ui/aura/aura.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698