OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/devices_app/usb/device_manager_impl.h" | 5 #include "device/devices_app/usb/device_manager_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
11 #include "device/core/device_client.h" | 11 #include "device/core/device_client.h" |
12 #include "device/devices_app/usb/device_impl.h" | 12 #include "device/devices_app/usb/device_impl.h" |
13 #include "device/devices_app/usb/public/interfaces/device.mojom.h" | 13 #include "device/devices_app/usb/public/interfaces/device.mojom.h" |
14 #include "device/devices_app/usb/type_converters.h" | 14 #include "device/devices_app/usb/type_converters.h" |
15 #include "device/usb/usb_device.h" | 15 #include "device/usb/usb_device.h" |
16 #include "device/usb/usb_device_filter.h" | 16 #include "device/usb/usb_device_filter.h" |
17 #include "device/usb/usb_service.h" | 17 #include "device/usb/usb_service.h" |
18 #include "third_party/mojo/src/mojo/public/cpp/bindings/array.h" | 18 #include "mojo/public/cpp/bindings/array.h" |
19 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" | 19 #include "mojo/public/cpp/bindings/interface_request.h" |
20 | 20 |
21 namespace device { | 21 namespace device { |
22 namespace usb { | 22 namespace usb { |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 using DeviceList = DeviceManagerImpl::DeviceList; | 26 using DeviceList = DeviceManagerImpl::DeviceList; |
27 using DeviceMap = DeviceManagerImpl::DeviceMap; | 27 using DeviceMap = DeviceManagerImpl::DeviceMap; |
28 | 28 |
29 void FilterAndConvertDevicesAndThen( | 29 void FilterAndConvertDevicesAndThen( |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 callback.Run(notification.Pass()); | 215 callback.Run(notification.Pass()); |
216 device_change_callbacks_.pop(); | 216 device_change_callbacks_.pop(); |
217 } | 217 } |
218 | 218 |
219 if (devices_added_.size() > 0 || !devices_removed_.empty()) | 219 if (devices_added_.size() > 0 || !devices_removed_.empty()) |
220 MaybeRunDeviceChangesCallback(); | 220 MaybeRunDeviceChangesCallback(); |
221 } | 221 } |
222 | 222 |
223 } // namespace usb | 223 } // namespace usb |
224 } // namespace device | 224 } // namespace device |
OLD | NEW |