| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_controller_evdev.h" | 5 #include "ui/events/ozone/evdev/input_controller_evdev.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <linux/input.h> | 8 #include <linux/input.h> |
| 9 | 9 |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 bool InputControllerEvdev::SetCurrentLayoutByName( | 85 bool InputControllerEvdev::SetCurrentLayoutByName( |
| 86 const std::string& layout_name) { | 86 const std::string& layout_name) { |
| 87 return keyboard_->SetCurrentLayoutByName(layout_name); | 87 return keyboard_->SetCurrentLayoutByName(layout_name); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void InputControllerEvdev::SetInternalTouchpadEnabled(bool enabled) { | 90 void InputControllerEvdev::SetInternalTouchpadEnabled(bool enabled) { |
| 91 input_device_settings_.enable_internal_touchpad = enabled; | 91 input_device_settings_.enable_internal_touchpad = enabled; |
| 92 ScheduleUpdateDeviceSettings(); | 92 ScheduleUpdateDeviceSettings(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 bool InputControllerEvdev::IsInternalTouchpadEnabled() const { |
| 96 return input_device_settings_.enable_internal_touchpad; |
| 97 } |
| 98 |
| 95 void InputControllerEvdev::SetTouchEventLoggingEnabled(bool enabled) { | 99 void InputControllerEvdev::SetTouchEventLoggingEnabled(bool enabled) { |
| 96 input_device_settings_.touch_event_logging_enabled = enabled; | 100 input_device_settings_.touch_event_logging_enabled = enabled; |
| 97 ScheduleUpdateDeviceSettings(); | 101 ScheduleUpdateDeviceSettings(); |
| 98 } | 102 } |
| 99 | 103 |
| 100 void InputControllerEvdev::SetInternalKeyboardFilter( | 104 void InputControllerEvdev::SetInternalKeyboardFilter( |
| 101 bool enable_filter, | 105 bool enable_filter, |
| 102 std::vector<DomCode> allowed_keys) { | 106 std::vector<DomCode> allowed_keys) { |
| 103 input_device_settings_.enable_internal_keyboard_filter = enable_filter; | 107 input_device_settings_.enable_internal_keyboard_filter = enable_filter; |
| 104 input_device_settings_.internal_keyboard_allowed_keys = allowed_keys; | 108 input_device_settings_.internal_keyboard_allowed_keys = allowed_keys; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 void InputControllerEvdev::UpdateCapsLockLed() { | 183 void InputControllerEvdev::UpdateCapsLockLed() { |
| 180 if (!input_device_factory_) | 184 if (!input_device_factory_) |
| 181 return; | 185 return; |
| 182 bool caps_lock_state = IsCapsLockEnabled(); | 186 bool caps_lock_state = IsCapsLockEnabled(); |
| 183 if (caps_lock_state != caps_lock_led_state_) | 187 if (caps_lock_state != caps_lock_led_state_) |
| 184 input_device_factory_->SetCapsLockLed(caps_lock_state); | 188 input_device_factory_->SetCapsLockLed(caps_lock_state); |
| 185 caps_lock_led_state_ = caps_lock_state; | 189 caps_lock_led_state_ = caps_lock_state; |
| 186 } | 190 } |
| 187 | 191 |
| 188 } // namespace ui | 192 } // namespace ui |
| OLD | NEW |