| 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_glib.h" | 5 #include "ui/events/platform/x11/x11_event_source_glib.h" |
| 6 | 6 |
| 7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
| 8 #include <glib.h> | 8 #include <glib.h> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 g_source_add_poll(x_source_, x_poll_.get()); | 91 g_source_add_poll(x_source_, x_poll_.get()); |
| 92 g_source_set_can_recurse(x_source_, TRUE); | 92 g_source_set_can_recurse(x_source_, TRUE); |
| 93 g_source_set_callback(x_source_, NULL, &event_source_, NULL); | 93 g_source_set_callback(x_source_, NULL, &event_source_, NULL); |
| 94 g_source_attach(x_source_, g_main_context_default()); | 94 g_source_attach(x_source_, g_main_context_default()); |
| 95 } | 95 } |
| 96 | 96 |
| 97 // static | 97 // static |
| 98 std::unique_ptr<PlatformEventSource> PlatformEventSource::CreateDefault() { | 98 std::unique_ptr<PlatformEventSource> PlatformEventSource::CreateDefault() { |
| 99 return base::WrapUnique(new X11EventSourceGlib(gfx::GetXDisplay())); | 99 return base::WrapUnique(new X11EventSourceGlib(gfx::GetXDisplay())); |
| 100 } | 100 } |
| 101 | |
| 102 } // namespace ui | 101 } // namespace ui |
| OLD | NEW |