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

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

Issue 2259753003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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_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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 x_source_ = glib_x_source; 90 x_source_ = glib_x_source;
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::MakeUnique<X11EventSourceGlib>(gfx::GetXDisplay());
100 } 100 }
101 101
102 } // namespace ui 102 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/platform/platform_event_source.cc ('k') | ui/events/platform/x11/x11_event_source_libevent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698