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

Side by Side Diff: ui/events/ozone/evdev/event_thread_evdev.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_THREAD_EVDEV_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_THREAD_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_THREAD_EVDEV_H_ 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_THREAD_EVDEV_H_
7 7
8 #include <memory>
9
8 #include "base/callback.h" 10 #include "base/callback.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 12
12 namespace base { 13 namespace base {
13 class Thread; 14 class Thread;
14 } 15 }
15 16
16 namespace ui { 17 namespace ui {
17 18
18 class CursorDelegateEvdev; 19 class CursorDelegateEvdev;
19 class DeviceEventDispatcherEvdev; 20 class DeviceEventDispatcherEvdev;
20 class InputDeviceFactoryEvdevProxy; 21 class InputDeviceFactoryEvdevProxy;
21 22
22 typedef base::Callback<void(scoped_ptr<InputDeviceFactoryEvdevProxy>)> 23 typedef base::Callback<void(std::unique_ptr<InputDeviceFactoryEvdevProxy>)>
23 EventThreadStartCallback; 24 EventThreadStartCallback;
24 25
25 // Wrapper for events thread. 26 // Wrapper for events thread.
26 class EventThreadEvdev { 27 class EventThreadEvdev {
27 public: 28 public:
28 EventThreadEvdev(); 29 EventThreadEvdev();
29 ~EventThreadEvdev(); 30 ~EventThreadEvdev();
30 31
31 // Start a new events thread. All device events will get sent to the 32 // Start a new events thread. All device events will get sent to the
32 // passed dispatcher. The thread will call directly into cursor, so it 33 // passed dispatcher. The thread will call directly into cursor, so it
33 // must be synchronized accordingly. 34 // must be synchronized accordingly.
34 void Start(scoped_ptr<DeviceEventDispatcherEvdev> dispatcher, 35 void Start(std::unique_ptr<DeviceEventDispatcherEvdev> dispatcher,
35 CursorDelegateEvdev* cursor, 36 CursorDelegateEvdev* cursor,
36 const EventThreadStartCallback& callback); 37 const EventThreadStartCallback& callback);
37 38
38 private: 39 private:
39 scoped_ptr<base::Thread> thread_; 40 std::unique_ptr<base::Thread> thread_;
40 41
41 DISALLOW_COPY_AND_ASSIGN(EventThreadEvdev); 42 DISALLOW_COPY_AND_ASSIGN(EventThreadEvdev);
42 }; 43 };
43 44
44 } // namespace ui 45 } // namespace ui
45 46
46 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_THREAD_EVDEV_H_ 47 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_THREAD_EVDEV_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_factory_evdev.cc ('k') | ui/events/ozone/evdev/event_thread_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698