OLD | NEW |
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 Loading... |
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 |
OLD | NEW |