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

Unified Diff: remoting/host/touch_injector_win.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU 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 | « remoting/host/touch_injector_win.h ('k') | remoting/host/touch_injector_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/touch_injector_win.cc
diff --git a/remoting/host/touch_injector_win.cc b/remoting/host/touch_injector_win.cc
index 6c7c262d65b55b0a8199558e69eea8deb308d14e..4d9074704423b24a4500fbc19f69de1217fba793 100644
--- a/remoting/host/touch_injector_win.cc
+++ b/remoting/host/touch_injector_win.cc
@@ -86,11 +86,11 @@ void ConvertToPointerTouchInfo(
TouchInjectorWinDelegate::~TouchInjectorWinDelegate() {}
// static.
-scoped_ptr<TouchInjectorWinDelegate> TouchInjectorWinDelegate::Create() {
+std::unique_ptr<TouchInjectorWinDelegate> TouchInjectorWinDelegate::Create() {
base::ScopedNativeLibrary library(base::FilePath(L"User32.dll"));
if (!library.is_valid()) {
PLOG(INFO) << "Failed to get library module for touch injection functions.";
- return scoped_ptr<TouchInjectorWinDelegate>();
+ return std::unique_ptr<TouchInjectorWinDelegate>();
}
InitializeTouchInjectionFunction init_func =
@@ -98,7 +98,7 @@ scoped_ptr<TouchInjectorWinDelegate> TouchInjectorWinDelegate::Create() {
library.GetFunctionPointer("InitializeTouchInjection"));
if (!init_func) {
PLOG(INFO) << "Failed to get InitializeTouchInjection function handle.";
- return scoped_ptr<TouchInjectorWinDelegate>();
+ return std::unique_ptr<TouchInjectorWinDelegate>();
}
InjectTouchInputFunction inject_touch_func =
@@ -106,12 +106,11 @@ scoped_ptr<TouchInjectorWinDelegate> TouchInjectorWinDelegate::Create() {
library.GetFunctionPointer("InjectTouchInput"));
if (!inject_touch_func) {
PLOG(INFO) << "Failed to get InjectTouchInput.";
- return scoped_ptr<TouchInjectorWinDelegate>();
+ return std::unique_ptr<TouchInjectorWinDelegate>();
}
- return scoped_ptr<TouchInjectorWinDelegate>(
- new TouchInjectorWinDelegate(
- library.Release(), init_func, inject_touch_func));
+ return std::unique_ptr<TouchInjectorWinDelegate>(new TouchInjectorWinDelegate(
+ library.Release(), init_func, inject_touch_func));
}
TouchInjectorWinDelegate::TouchInjectorWinDelegate(
@@ -190,7 +189,7 @@ void TouchInjectorWin::InjectTouchEvent(const TouchEvent& event) {
}
void TouchInjectorWin::SetInjectorDelegateForTest(
- scoped_ptr<TouchInjectorWinDelegate> functions) {
+ std::unique_ptr<TouchInjectorWinDelegate> functions) {
delegate_ = std::move(functions);
}
« no previous file with comments | « remoting/host/touch_injector_win.h ('k') | remoting/host/touch_injector_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698