| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 void InputControllerEvdev::EnableInternalTouchpad() { | 92 void InputControllerEvdev::EnableInternalTouchpad() { |
| 93 if (input_device_factory_) | 93 if (input_device_factory_) |
| 94 input_device_factory_->EnableInternalTouchpad(); | 94 input_device_factory_->EnableInternalTouchpad(); |
| 95 } | 95 } |
| 96 | 96 |
| 97 void InputControllerEvdev::DisableInternalKeyboardExceptKeys( | 97 void InputControllerEvdev::DisableInternalKeyboardExceptKeys( |
| 98 scoped_ptr<std::set<DomCode>> excepted_keys) { | 98 scoped_ptr<std::set<DomCode>> excepted_keys) { |
| 99 if (input_device_factory_) { | 99 if (input_device_factory_) { |
| 100 input_device_factory_->DisableInternalKeyboardExceptKeys( | 100 input_device_factory_->DisableInternalKeyboardExceptKeys( |
| 101 excepted_keys.Pass()); | 101 excepted_keys.Pass()); |
| 102 | |
| 103 // Release keys since we may block key up events. | |
| 104 keyboard_->Reset(); | |
| 105 } | 102 } |
| 106 } | 103 } |
| 107 | 104 |
| 108 void InputControllerEvdev::EnableInternalKeyboard() { | 105 void InputControllerEvdev::EnableInternalKeyboard() { |
| 109 if (input_device_factory_) | 106 if (input_device_factory_) |
| 110 input_device_factory_->EnableInternalKeyboard(); | 107 input_device_factory_->EnableInternalKeyboard(); |
| 111 } | 108 } |
| 112 | 109 |
| 113 void InputControllerEvdev::SetTouchpadSensitivity(int value) { | 110 void InputControllerEvdev::SetTouchpadSensitivity(int value) { |
| 114 input_device_settings_.touchpad_sensitivity = value; | 111 input_device_settings_.touchpad_sensitivity = value; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 void InputControllerEvdev::UpdateCapsLockLed() { | 181 void InputControllerEvdev::UpdateCapsLockLed() { |
| 185 if (!input_device_factory_) | 182 if (!input_device_factory_) |
| 186 return; | 183 return; |
| 187 bool caps_lock_state = IsCapsLockEnabled(); | 184 bool caps_lock_state = IsCapsLockEnabled(); |
| 188 if (caps_lock_state != caps_lock_led_state_) | 185 if (caps_lock_state != caps_lock_led_state_) |
| 189 input_device_factory_->SetCapsLockLed(caps_lock_state); | 186 input_device_factory_->SetCapsLockLed(caps_lock_state); |
| 190 caps_lock_led_state_ = caps_lock_state; | 187 caps_lock_led_state_ = caps_lock_state; |
| 191 } | 188 } |
| 192 | 189 |
| 193 } // namespace ui | 190 } // namespace ui |
| OLD | NEW |