| 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_proxy.h" | 5 #include "ui/events/ozone/evdev/input_device_factory_evdev_proxy.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
| 9 #include "ui/events/ozone/evdev/input_device_factory_evdev.h" | 9 #include "ui/events/ozone/evdev/input_device_factory_evdev.h" |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 base::Bind(&InputDeviceFactoryEvdev::DisableInternalKeyboardExceptKeys, | 64 base::Bind(&InputDeviceFactoryEvdev::DisableInternalKeyboardExceptKeys, |
| 65 input_device_factory_, base::Passed(&excepted_keys))); | 65 input_device_factory_, base::Passed(&excepted_keys))); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void InputDeviceFactoryEvdevProxy::EnableInternalKeyboard() { | 68 void InputDeviceFactoryEvdevProxy::EnableInternalKeyboard() { |
| 69 task_runner_->PostTask( | 69 task_runner_->PostTask( |
| 70 FROM_HERE, base::Bind(&InputDeviceFactoryEvdev::EnableInternalKeyboard, | 70 FROM_HERE, base::Bind(&InputDeviceFactoryEvdev::EnableInternalKeyboard, |
| 71 input_device_factory_)); | 71 input_device_factory_)); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void InputDeviceFactoryEvdevProxy::SetTouchpadSensitivity(int value) { | 74 void InputDeviceFactoryEvdevProxy::UpdateInputDeviceSettings( |
| 75 const InputDeviceSettingsEvdev& settings) { |
| 75 task_runner_->PostTask( | 76 task_runner_->PostTask( |
| 76 FROM_HERE, base::Bind(&InputDeviceFactoryEvdev::SetTouchpadSensitivity, | 77 FROM_HERE, base::Bind(&InputDeviceFactoryEvdev::UpdateInputDeviceSettings, |
| 77 input_device_factory_, value)); | 78 input_device_factory_, settings)); |
| 78 } | |
| 79 | |
| 80 void InputDeviceFactoryEvdevProxy::SetTapToClick(bool enabled) { | |
| 81 task_runner_->PostTask(FROM_HERE, | |
| 82 base::Bind(&InputDeviceFactoryEvdev::SetTapToClick, | |
| 83 input_device_factory_, enabled)); | |
| 84 } | |
| 85 | |
| 86 void InputDeviceFactoryEvdevProxy::SetThreeFingerClick(bool enabled) { | |
| 87 task_runner_->PostTask( | |
| 88 FROM_HERE, base::Bind(&InputDeviceFactoryEvdev::SetThreeFingerClick, | |
| 89 input_device_factory_, enabled)); | |
| 90 } | |
| 91 | |
| 92 void InputDeviceFactoryEvdevProxy::SetTapDragging(bool enabled) { | |
| 93 task_runner_->PostTask(FROM_HERE, | |
| 94 base::Bind(&InputDeviceFactoryEvdev::SetTapDragging, | |
| 95 input_device_factory_, enabled)); | |
| 96 } | |
| 97 | |
| 98 void InputDeviceFactoryEvdevProxy::SetNaturalScroll(bool enabled) { | |
| 99 task_runner_->PostTask(FROM_HERE, | |
| 100 base::Bind(&InputDeviceFactoryEvdev::SetNaturalScroll, | |
| 101 input_device_factory_, enabled)); | |
| 102 } | |
| 103 | |
| 104 void InputDeviceFactoryEvdevProxy::SetMouseSensitivity(int value) { | |
| 105 task_runner_->PostTask( | |
| 106 FROM_HERE, base::Bind(&InputDeviceFactoryEvdev::SetMouseSensitivity, | |
| 107 input_device_factory_, value)); | |
| 108 } | |
| 109 | |
| 110 void InputDeviceFactoryEvdevProxy::SetTapToClickPaused(bool state) { | |
| 111 task_runner_->PostTask( | |
| 112 FROM_HERE, base::Bind(&InputDeviceFactoryEvdev::SetTapToClickPaused, | |
| 113 input_device_factory_, state)); | |
| 114 } | 79 } |
| 115 | 80 |
| 116 void InputDeviceFactoryEvdevProxy::GetTouchDeviceStatus( | 81 void InputDeviceFactoryEvdevProxy::GetTouchDeviceStatus( |
| 117 const GetTouchDeviceStatusReply& reply) { | 82 const GetTouchDeviceStatusReply& reply) { |
| 118 task_runner_->PostTask( | 83 task_runner_->PostTask( |
| 119 FROM_HERE, | 84 FROM_HERE, |
| 120 base::Bind(&InputDeviceFactoryEvdev::GetTouchDeviceStatus, | 85 base::Bind(&InputDeviceFactoryEvdev::GetTouchDeviceStatus, |
| 121 input_device_factory_, | 86 input_device_factory_, |
| 122 base::Bind(&ForwardGetTouchDeviceStatusReply, | 87 base::Bind(&ForwardGetTouchDeviceStatusReply, |
| 123 base::ThreadTaskRunnerHandle::Get(), reply))); | 88 base::ThreadTaskRunnerHandle::Get(), reply))); |
| 124 } | 89 } |
| 125 | 90 |
| 126 } // namespace ui | 91 } // namespace ui |
| OLD | NEW |