| 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/platform/x11/x11_hotplug_event_handler.h" | 5 #include "ui/events/platform/x11/x11_hotplug_event_handler.h" |
| 6 | 6 |
| 7 #include <X11/Xatom.h> | 7 #include <X11/Xatom.h> |
| 8 #include <X11/extensions/XInput.h> | 8 #include <X11/extensions/XInput.h> |
| 9 #include <X11/extensions/XInput2.h> | 9 #include <X11/extensions/XInput2.h> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 namespace ui { | 35 namespace ui { |
| 36 | 36 |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| 39 // Names of all known internal devices that should not be considered as | 39 // Names of all known internal devices that should not be considered as |
| 40 // keyboards. | 40 // keyboards. |
| 41 // TODO(rsadam@): Identify these devices using udev rules. (Crbug.com/420728.) | 41 // TODO(rsadam@): Identify these devices using udev rules. (Crbug.com/420728.) |
| 42 const char* kKnownInvalidKeyboardDeviceNames[] = {"Power Button", | 42 const char* kKnownInvalidKeyboardDeviceNames[] = {"Power Button", |
| 43 "Sleep Button", | 43 "Sleep Button", |
| 44 "Video Bus"}; | 44 "Video Bus", |
| 45 "gpio-keys.12", |
| 46 "ROCKCHIP-I2S Headset Jack"}; |
| 45 | 47 |
| 46 const char* kCachedAtomList[] = { | 48 const char* kCachedAtomList[] = { |
| 47 "Abs MT Position X", | 49 "Abs MT Position X", |
| 48 "Abs MT Position Y", | 50 "Abs MT Position Y", |
| 49 NULL, | 51 NULL, |
| 50 }; | 52 }; |
| 51 | 53 |
| 52 typedef base::Callback<void(const std::vector<KeyboardDevice>&)> | 54 typedef base::Callback<void(const std::vector<KeyboardDevice>&)> |
| 53 KeyboardDeviceCallback; | 55 KeyboardDeviceCallback; |
| 54 | 56 |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 base::WorkerPool::PostTask(FROM_HERE, | 350 base::WorkerPool::PostTask(FROM_HERE, |
| 349 base::Bind(&HandleHotplugEventInWorker, | 351 base::Bind(&HandleHotplugEventInWorker, |
| 350 device_infos, | 352 device_infos, |
| 351 display_state, | 353 display_state, |
| 352 base::ThreadTaskRunnerHandle::Get(), | 354 base::ThreadTaskRunnerHandle::Get(), |
| 353 callbacks), | 355 callbacks), |
| 354 true /* task_is_slow */); | 356 true /* task_is_slow */); |
| 355 } | 357 } |
| 356 | 358 |
| 357 } // namespace ui | 359 } // namespace ui |
| OLD | NEW |