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

Unified Diff: ui/events/ozone/evdev/event_factory_evdev.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/ozone/evdev/event_factory_evdev.h ('k') | ui/events/ozone/evdev/event_thread_evdev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/event_factory_evdev.cc
diff --git a/ui/events/ozone/evdev/event_factory_evdev.cc b/ui/events/ozone/evdev/event_factory_evdev.cc
index c8e99ee01487767f8a4738c6ba50c0d4d2a81fff..31879271c5976ebaf08f7f948ff5d19a5dcb8ff6 100644
--- a/ui/events/ozone/evdev/event_factory_evdev.cc
+++ b/ui/events/ozone/evdev/event_factory_evdev.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "base/task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/worker_pool.h"
@@ -149,14 +150,15 @@ void EventFactoryEvdev::Init() {
initialized_ = true;
}
-scoped_ptr<SystemInputInjector> EventFactoryEvdev::CreateSystemInputInjector() {
+std::unique_ptr<SystemInputInjector>
+EventFactoryEvdev::CreateSystemInputInjector() {
// Use forwarding dispatcher for the injector rather than dispatching
// directly. We cannot assume it is safe to (re-)enter ui::Event dispatch
// synchronously from the injection point.
- scoped_ptr<DeviceEventDispatcherEvdev> proxy_dispatcher(
+ std::unique_ptr<DeviceEventDispatcherEvdev> proxy_dispatcher(
new ProxyDeviceEventDispatcher(base::ThreadTaskRunnerHandle::Get(),
weak_ptr_factory_.GetWeakPtr()));
- return make_scoped_ptr(
+ return base::WrapUnique(
new InputInjectorEvdev(std::move(proxy_dispatcher), cursor_));
}
@@ -404,7 +406,7 @@ int EventFactoryEvdev::NextDeviceId() {
void EventFactoryEvdev::StartThread() {
// Set up device factory.
- scoped_ptr<DeviceEventDispatcherEvdev> proxy_dispatcher(
+ std::unique_ptr<DeviceEventDispatcherEvdev> proxy_dispatcher(
new ProxyDeviceEventDispatcher(base::ThreadTaskRunnerHandle::Get(),
weak_ptr_factory_.GetWeakPtr()));
thread_.Start(std::move(proxy_dispatcher), cursor_,
@@ -413,7 +415,7 @@ void EventFactoryEvdev::StartThread() {
}
void EventFactoryEvdev::OnThreadStarted(
- scoped_ptr<InputDeviceFactoryEvdevProxy> input_device_factory) {
+ std::unique_ptr<InputDeviceFactoryEvdevProxy> input_device_factory) {
TRACE_EVENT0("evdev", "EventFactoryEvdev::OnThreadStarted");
input_device_factory_proxy_ = std::move(input_device_factory);
« no previous file with comments | « ui/events/ozone/evdev/event_factory_evdev.h ('k') | ui/events/ozone/evdev/event_thread_evdev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698