| 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/input_device_factory_evdev.h" | 5 #include "ui/events/ozone/evdev/input_device_factory_evdev.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <linux/input.h> | 8 #include <linux/input.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 : task_runner_(base::ThreadTaskRunnerHandle::Get()), | 182 : task_runner_(base::ThreadTaskRunnerHandle::Get()), |
| 183 cursor_(cursor), | 183 cursor_(cursor), |
| 184 #if defined(USE_EVDEV_GESTURES) | 184 #if defined(USE_EVDEV_GESTURES) |
| 185 gesture_property_provider_(new GesturePropertyProvider), | 185 gesture_property_provider_(new GesturePropertyProvider), |
| 186 #endif | 186 #endif |
| 187 dispatcher_(std::move(dispatcher)), | 187 dispatcher_(std::move(dispatcher)), |
| 188 weak_ptr_factory_(this) { | 188 weak_ptr_factory_(this) { |
| 189 } | 189 } |
| 190 | 190 |
| 191 InputDeviceFactoryEvdev::~InputDeviceFactoryEvdev() { | 191 InputDeviceFactoryEvdev::~InputDeviceFactoryEvdev() { |
| 192 STLDeleteValues(&converters_); | 192 base::STLDeleteValues(&converters_); |
| 193 } | 193 } |
| 194 | 194 |
| 195 void InputDeviceFactoryEvdev::AddInputDevice(int id, | 195 void InputDeviceFactoryEvdev::AddInputDevice(int id, |
| 196 const base::FilePath& path) { | 196 const base::FilePath& path) { |
| 197 std::unique_ptr<OpenInputDeviceParams> params(new OpenInputDeviceParams); | 197 std::unique_ptr<OpenInputDeviceParams> params(new OpenInputDeviceParams); |
| 198 params->id = id; | 198 params->id = id; |
| 199 params->path = path; | 199 params->path = path; |
| 200 params->cursor = cursor_; | 200 params->cursor = cursor_; |
| 201 params->dispatcher = dispatcher_.get(); | 201 params->dispatcher = dispatcher_.get(); |
| 202 | 202 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 std::vector<int> ids; | 485 std::vector<int> ids; |
| 486 gesture_property_provider_->GetDeviceIdsByType(type, &ids); | 486 gesture_property_provider_->GetDeviceIdsByType(type, &ids); |
| 487 for (size_t i = 0; i < ids.size(); ++i) { | 487 for (size_t i = 0; i < ids.size(); ++i) { |
| 488 SetGestureBoolProperty(gesture_property_provider_.get(), ids[i], name, | 488 SetGestureBoolProperty(gesture_property_provider_.get(), ids[i], name, |
| 489 value); | 489 value); |
| 490 } | 490 } |
| 491 #endif | 491 #endif |
| 492 } | 492 } |
| 493 | 493 |
| 494 } // namespace ui | 494 } // namespace ui |
| OLD | NEW |