| OLD | NEW |
| 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 <glib.h> | 7 #include <glib.h> |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 | 9 |
| 10 namespace ui { | 10 namespace ui { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 // The poll attached to |x_source_|. | 88 // The poll attached to |x_source_|. |
| 89 scoped_ptr<GPollFD> x_poll_; | 89 scoped_ptr<GPollFD> x_poll_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(X11EventSourceGlib); | 91 DISALLOW_COPY_AND_ASSIGN(X11EventSourceGlib); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace | 94 } // namespace |
| 95 | 95 |
| 96 scoped_ptr<PlatformEventSource> PlatformEventSource::CreateDefault() { | 96 scoped_ptr<PlatformEventSource> PlatformEventSource::CreateDefault() { |
| 97 return scoped_ptr<PlatformEventSource>( | 97 return make_scoped_ptr(new X11EventSourceGlib(gfx::GetXDisplay())); |
| 98 new X11EventSourceGlib(gfx::GetXDisplay())); | |
| 99 } | 98 } |
| 100 | 99 |
| 101 } // namespace ui | 100 } // namespace ui |
| OLD | NEW |