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

Side by Side Diff: media/base/user_input_monitor_linux.cc

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: . Created 4 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "media/base/user_input_monitor.h" 5 #include "media/base/user_input_monitor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <sys/select.h> 8 #include <sys/select.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 #define XK_MISCELLANY 10 #define XK_MISCELLANY
11 #include <X11/keysymdef.h> 11 #include <X11/keysymdef.h>
12 12
13 #include "base/bind.h" 13 #include "base/bind.h"
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/location.h" 16 #include "base/location.h"
17 #include "base/logging.h" 17 #include "base/logging.h"
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "base/memory/ptr_util.h"
19 #include "base/message_loop/message_loop.h" 20 #include "base/message_loop/message_loop.h"
20 #include "base/message_loop/message_pump_libevent.h" 21 #include "base/message_loop/message_pump_libevent.h"
21 #include "base/single_thread_task_runner.h" 22 #include "base/single_thread_task_runner.h"
22 #include "base/synchronization/lock.h" 23 #include "base/synchronization/lock.h"
23 #include "media/base/keyboard_event_counter.h" 24 #include "media/base/keyboard_event_counter.h"
24 #include "third_party/skia/include/core/SkPoint.h" 25 #include "third_party/skia/include/core/SkPoint.h"
25 #include "ui/events/keycodes/keyboard_code_conversion_x.h" 26 #include "ui/events/keycodes/keyboard_code_conversion_x.h"
26 #include "ui/gfx/x/x11_types.h" 27 #include "ui/gfx/x/x11_types.h"
27 28
28 // These includes need to be later than dictated by the style guide due to 29 // These includes need to be later than dictated by the style guide due to
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 369
369 void UserInputMonitorLinux::StopMouseMonitoring() { 370 void UserInputMonitorLinux::StopMouseMonitoring() {
370 io_task_runner_->PostTask(FROM_HERE, 371 io_task_runner_->PostTask(FROM_HERE,
371 base::Bind(&UserInputMonitorLinuxCore::StopMonitor, 372 base::Bind(&UserInputMonitorLinuxCore::StopMonitor,
372 core_->AsWeakPtr(), 373 core_->AsWeakPtr(),
373 UserInputMonitorLinuxCore::MOUSE_EVENT)); 374 UserInputMonitorLinuxCore::MOUSE_EVENT));
374 } 375 }
375 376
376 } // namespace 377 } // namespace
377 378
378 scoped_ptr<UserInputMonitor> UserInputMonitor::Create( 379 std::unique_ptr<UserInputMonitor> UserInputMonitor::Create(
379 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, 380 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
380 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner) { 381 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner) {
381 return scoped_ptr<UserInputMonitor>( 382 return base::WrapUnique(new UserInputMonitorLinux(io_task_runner));
382 new UserInputMonitorLinux(io_task_runner));
383 } 383 }
384 384
385 } // namespace media 385 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698