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

Side by Side Diff: ui/events/ozone/evdev/event_converter_test_util.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 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 #include "ui/events/ozone/evdev/event_converter_test_util.h" 5 #include "ui/events/ozone/evdev/event_converter_test_util.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "ui/events/ozone/device/device_manager.h" 10 #include "ui/events/ozone/device/device_manager.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return POST_DISPATCH_NONE; 103 return POST_DISPATCH_NONE;
104 } 104 }
105 105
106 EventDispatchCallback callback_; 106 EventDispatchCallback callback_;
107 }; 107 };
108 108
109 } // namespace 109 } // namespace
110 110
111 std::unique_ptr<DeviceEventDispatcherEvdev> 111 std::unique_ptr<DeviceEventDispatcherEvdev>
112 CreateDeviceEventDispatcherEvdevForTest(EventFactoryEvdev* event_factory) { 112 CreateDeviceEventDispatcherEvdevForTest(EventFactoryEvdev* event_factory) {
113 return base::WrapUnique(new TestDeviceEventDispatcherEvdev(event_factory)); 113 return base::MakeUnique<TestDeviceEventDispatcherEvdev>(event_factory);
114 } 114 }
115 115
116 std::unique_ptr<DeviceManager> CreateDeviceManagerForTest() { 116 std::unique_ptr<DeviceManager> CreateDeviceManagerForTest() {
117 return base::WrapUnique(new TestDeviceManager()); 117 return base::MakeUnique<TestDeviceManager>();
118 } 118 }
119 119
120 std::unique_ptr<EventFactoryEvdev> CreateEventFactoryEvdevForTest( 120 std::unique_ptr<EventFactoryEvdev> CreateEventFactoryEvdevForTest(
121 CursorDelegateEvdev* cursor, 121 CursorDelegateEvdev* cursor,
122 DeviceManager* device_manager, 122 DeviceManager* device_manager,
123 KeyboardLayoutEngine* keyboard_layout_engine, 123 KeyboardLayoutEngine* keyboard_layout_engine,
124 const EventDispatchCallback& callback) { 124 const EventDispatchCallback& callback) {
125 return base::WrapUnique(new TestEventFactoryEvdev( 125 return base::MakeUnique<TestEventFactoryEvdev>(
126 cursor, device_manager, keyboard_layout_engine, callback)); 126 cursor, device_manager, keyboard_layout_engine, callback);
127 } 127 }
128 128
129 } // namespace ui 129 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/device/udev/device_manager_udev.cc ('k') | ui/events/ozone/evdev/event_factory_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698