| 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 "device/hid/hid_service.h" | 5 #include "device/hid/hid_service.h" |
| 6 | 6 |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "components/device_event_log/device_event_log.h" | 12 #include "components/device_event_log/device_event_log.h" |
| 13 | 13 |
| 14 #if defined(OS_LINUX) && defined(USE_UDEV) | 14 #if defined(OS_LINUX) && defined(USE_UDEV) |
| 15 #include "device/hid/hid_service_linux.h" | 15 #include "device/hid/hid_service_linux.h" |
| 16 #elif defined(OS_MACOSX) | 16 #elif defined(OS_MACOSX) |
| 17 #include "device/hid/hid_service_mac.h" | 17 #include "device/hid/hid_service_mac.h" |
| 18 #else | 18 #elif defined(OS_WIN) |
| 19 #include "device/hid/hid_service_win.h" | 19 #include "device/hid/hid_service_win.h" |
| 20 #endif | 20 #endif |
| 21 | 21 |
| 22 namespace device { | 22 namespace device { |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 HidService* g_service; | 26 HidService* g_service; |
| 27 } | 27 } |
| 28 | 28 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 } | 139 } |
| 140 | 140 |
| 141 for (const GetDevicesCallback& callback : pending_enumerations_) { | 141 for (const GetDevicesCallback& callback : pending_enumerations_) { |
| 142 callback.Run(devices); | 142 callback.Run(devices); |
| 143 } | 143 } |
| 144 pending_enumerations_.clear(); | 144 pending_enumerations_.clear(); |
| 145 } | 145 } |
| 146 } | 146 } |
| 147 | 147 |
| 148 } // namespace device | 148 } // namespace device |
| OLD | NEW |