| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/x/device_list_cache_x.h" | 5 #include "ui/events/x/device_list_cache_x.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "ui/events/x/device_data_manager_x11.h" | 11 #include "ui/events/devices/device_data_manager_x11.h" |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 bool IsXI2Available() { | 15 bool IsXI2Available() { |
| 16 #if defined(USE_AURA) | 16 #if defined(USE_AURA) |
| 17 return ui::DeviceDataManagerX11::GetInstance()->IsXInput2Available(); | 17 return ui::DeviceDataManagerX11::GetInstance()->IsXInput2Available(); |
| 18 #else | 18 #else |
| 19 return false; | 19 return false; |
| 20 #endif | 20 #endif |
| 21 } | 21 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 XIDeviceList& xi_dev_list = xi_dev_list_map_[display]; | 69 XIDeviceList& xi_dev_list = xi_dev_list_map_[display]; |
| 70 if (!xi_dev_list.devices && !xi_dev_list.count) { | 70 if (!xi_dev_list.devices && !xi_dev_list.count) { |
| 71 xi_dev_list.devices = XIQueryDevice(display, XIAllDevices, | 71 xi_dev_list.devices = XIQueryDevice(display, XIAllDevices, |
| 72 &xi_dev_list.count); | 72 &xi_dev_list.count); |
| 73 } | 73 } |
| 74 return xi_dev_list; | 74 return xi_dev_list; |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace ui | 77 } // namespace ui |
| 78 | 78 |
| OLD | NEW |