| 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 | 9 |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 331 |
| 332 void InputDeviceFactoryEvdev::SetMouseSensitivity(int value) { | 332 void InputDeviceFactoryEvdev::SetMouseSensitivity(int value) { |
| 333 SetIntPropertyForOneType(DT_MOUSE, "Pointer Sensitivity", value); | 333 SetIntPropertyForOneType(DT_MOUSE, "Pointer Sensitivity", value); |
| 334 SetIntPropertyForOneType(DT_MOUSE, "Scroll Sensitivity", value); | 334 SetIntPropertyForOneType(DT_MOUSE, "Scroll Sensitivity", value); |
| 335 } | 335 } |
| 336 | 336 |
| 337 void InputDeviceFactoryEvdev::SetTapToClickPaused(bool state) { | 337 void InputDeviceFactoryEvdev::SetTapToClickPaused(bool state) { |
| 338 SetBoolPropertyForOneType(DT_TOUCHPAD, "Tap Paused", state); | 338 SetBoolPropertyForOneType(DT_TOUCHPAD, "Tap Paused", state); |
| 339 } | 339 } |
| 340 | 340 |
| 341 base::WeakPtr<InputDeviceFactoryEvdev> InputDeviceFactoryEvdev::GetWeakPtr() { |
| 342 return weak_ptr_factory_.GetWeakPtr(); |
| 343 } |
| 344 |
| 341 void InputDeviceFactoryEvdev::NotifyDeviceChange( | 345 void InputDeviceFactoryEvdev::NotifyDeviceChange( |
| 342 const EventConverterEvdev& converter) { | 346 const EventConverterEvdev& converter) { |
| 343 if (converter.HasTouchscreen()) | 347 if (converter.HasTouchscreen()) |
| 344 NotifyTouchscreensUpdated(); | 348 NotifyTouchscreensUpdated(); |
| 345 | 349 |
| 346 if (converter.HasKeyboard()) | 350 if (converter.HasKeyboard()) |
| 347 NotifyKeyboardsUpdated(); | 351 NotifyKeyboardsUpdated(); |
| 348 | 352 |
| 349 if (converter.HasMouse()) | 353 if (converter.HasMouse()) |
| 350 NotifyMouseDevicesUpdated(); | 354 NotifyMouseDevicesUpdated(); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 std::vector<int> ids; | 434 std::vector<int> ids; |
| 431 gesture_property_provider_->GetDeviceIdsByType(type, &ids); | 435 gesture_property_provider_->GetDeviceIdsByType(type, &ids); |
| 432 for (size_t i = 0; i < ids.size(); ++i) { | 436 for (size_t i = 0; i < ids.size(); ++i) { |
| 433 SetGestureBoolProperty(gesture_property_provider_.get(), ids[i], name, | 437 SetGestureBoolProperty(gesture_property_provider_.get(), ids[i], name, |
| 434 value); | 438 value); |
| 435 } | 439 } |
| 436 #endif | 440 #endif |
| 437 } | 441 } |
| 438 | 442 |
| 439 } // namespace ui | 443 } // namespace ui |
| OLD | NEW |