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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 bool InputControllerEvdev::IsCapsLockEnabled() { | 56 bool InputControllerEvdev::IsCapsLockEnabled() { |
57 return keyboard_->IsCapsLockEnabled(); | 57 return keyboard_->IsCapsLockEnabled(); |
58 } | 58 } |
59 | 59 |
60 void InputControllerEvdev::SetCapsLockEnabled(bool enabled) { | 60 void InputControllerEvdev::SetCapsLockEnabled(bool enabled) { |
61 keyboard_->SetCapsLockEnabled(enabled); | 61 keyboard_->SetCapsLockEnabled(enabled); |
62 UpdateCapsLockLed(); | 62 UpdateCapsLockLed(); |
63 } | 63 } |
64 | 64 |
65 void InputControllerEvdev::SetNumLockEnabled(bool enabled) { | 65 void InputControllerEvdev::SetNumLockEnabled(bool enabled) { |
66 NOTIMPLEMENTED(); | 66 // No num lock on Chrome OS. |
67 } | 67 } |
68 | 68 |
69 bool InputControllerEvdev::IsAutoRepeatEnabled() { | 69 bool InputControllerEvdev::IsAutoRepeatEnabled() { |
70 return keyboard_->IsAutoRepeatEnabled(); | 70 return keyboard_->IsAutoRepeatEnabled(); |
71 } | 71 } |
72 | 72 |
73 void InputControllerEvdev::SetAutoRepeatEnabled(bool enabled) { | 73 void InputControllerEvdev::SetAutoRepeatEnabled(bool enabled) { |
74 keyboard_->SetAutoRepeatEnabled(enabled); | 74 keyboard_->SetAutoRepeatEnabled(enabled); |
75 } | 75 } |
76 | 76 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 void InputControllerEvdev::UpdateCapsLockLed() { | 181 void InputControllerEvdev::UpdateCapsLockLed() { |
182 if (!input_device_factory_) | 182 if (!input_device_factory_) |
183 return; | 183 return; |
184 bool caps_lock_state = IsCapsLockEnabled(); | 184 bool caps_lock_state = IsCapsLockEnabled(); |
185 if (caps_lock_state != caps_lock_led_state_) | 185 if (caps_lock_state != caps_lock_led_state_) |
186 input_device_factory_->SetCapsLockLed(caps_lock_state); | 186 input_device_factory_->SetCapsLockLed(caps_lock_state); |
187 caps_lock_led_state_ = caps_lock_state; | 187 caps_lock_led_state_ = caps_lock_state; |
188 } | 188 } |
189 | 189 |
190 } // namespace ui | 190 } // namespace ui |
OLD | NEW |