Index: chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.cc |
diff --git a/chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.cc |
index 55484ddb893352c07e8bf18af15b2a02e6a2a74e..25e696c9f47363305afcff7e6b16ccd792222289 100644 |
--- a/chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.cc |
+++ b/chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.cc |
@@ -61,6 +61,10 @@ bool DeviceIsKeyboard(device::BluetoothDevice::DeviceType device_type) { |
device_type == device::BluetoothDevice::DEVICE_KEYBOARD_MOUSE_COMBO; |
} |
+bool DeviceIsKeyboard(const device::InputServiceLinux::InputDeviceInfo& info) { |
+ return info.is_keyboard || info.is_touchscreen || info.is_tablet; |
ygorshenin1
2014/12/24 09:34:47
I disagree about touchscreen, because presence of
merkulova
2014/12/24 13:47:46
Left to be discussed.
|
+} |
+ |
} // namespace |
namespace chromeos { |
@@ -123,10 +127,8 @@ void HIDDetectionScreenHandler::Show() { |
num_of_times_dialog_was_shown + 1); |
ShowScreen(OobeUI::kScreenHIDDetection, NULL); |
- if (!pointing_device_id_.empty()) |
- SendPointingDeviceNotification(); |
- if (!keyboard_device_id_.empty()) |
- SendKeyboardDeviceNotification(NULL); |
+ SendPointingDeviceNotification(); |
+ SendKeyboardDeviceNotification(NULL); |
} |
void HIDDetectionScreenHandler::Hide() { |
@@ -369,7 +371,7 @@ void HIDDetectionScreenHandler::OnInputDeviceAdded( |
pointing_device_connect_type_ = info.type; |
SendPointingDeviceNotification(); |
} |
- if (keyboard_device_id_.empty() && info.is_keyboard) { |
+ if (keyboard_device_id_.empty() && DeviceIsKeyboard(info)) { |
keyboard_device_id_ = info.id; |
keyboard_device_name_ = info.name; |
keyboard_device_connect_type_ = info.type; |