Chromium Code Reviews| Index: ui/events/ozone/evdev/input_controller_evdev.cc |
| diff --git a/ui/events/ozone/evdev/input_controller_evdev.cc b/ui/events/ozone/evdev/input_controller_evdev.cc |
| index 19c728b39b70837a890a892e2009f66628ac0d85..631735ae791998b709d5993c4d656555f05bd139 100644 |
| --- a/ui/events/ozone/evdev/input_controller_evdev.cc |
| +++ b/ui/events/ozone/evdev/input_controller_evdev.cc |
| @@ -22,6 +22,7 @@ InputControllerEvdev::InputControllerEvdev(KeyboardEvdev* keyboard, |
| button_map_(button_map), |
| has_mouse_(false), |
| has_touchpad_(false), |
| + caps_lock_led_state_(false), |
| weak_ptr_factory_(this) { |
| } |
| @@ -33,6 +34,7 @@ void InputControllerEvdev::SetInputDeviceFactory( |
| input_device_factory_ = input_device_factory; |
| UpdateDeviceSettings(); |
| + UpdateCapsLockLed(); |
| } |
| void InputControllerEvdev::set_has_mouse(bool has_mouse) { |
| @@ -57,6 +59,9 @@ bool InputControllerEvdev::IsCapsLockEnabled() { |
| void InputControllerEvdev::SetCapsLockEnabled(bool enabled) { |
| keyboard_->SetCapsLockEnabled(enabled); |
| + |
| + if (input_device_factory_) |
|
kpschoedel
2015/03/02 22:19:35
This doesn't thrill me because the connection betw
spang
2015/03/02 22:43:15
Done.
|
| + UpdateCapsLockLed(); |
| } |
| void InputControllerEvdev::SetNumLockEnabled(bool enabled) { |
| @@ -178,4 +183,11 @@ void InputControllerEvdev::UpdateDeviceSettings() { |
| settings_update_pending_ = false; |
| } |
| +void InputControllerEvdev::UpdateCapsLockLed() { |
| + bool caps_lock_state = IsCapsLockEnabled(); |
| + if (caps_lock_state != caps_lock_led_state_) |
| + input_device_factory_->SetCapsLockLed(caps_lock_state); |
| + caps_lock_led_state_ = caps_lock_state; |
| +} |
| + |
| } // namespace ui |