| 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 #ifndef DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_ | 5 #ifndef DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_ |
| 6 #define DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_ | 6 #define DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <set> | 10 #include <set> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/scoped_observer.h" | 16 #include "base/scoped_observer.h" |
| 17 #include "device/usb/public/interfaces/device_manager.mojom.h" | 17 #include "device/usb/public/interfaces/device_manager.mojom.h" |
| 18 #include "device/usb/usb_service.h" | 18 #include "device/usb/usb_service.h" |
| 19 #include "mojo/public/cpp/bindings/array.h" | 19 #include "mojo/public/cpp/bindings/array.h" |
| 20 #include "mojo/public/cpp/bindings/interface_request.h" | 20 #include "mojo/public/cpp/bindings/interface_request.h" |
| 21 | 21 |
| 22 namespace base { | |
| 23 class SequencedTaskRunner; | |
| 24 } | |
| 25 | |
| 26 namespace device { | 22 namespace device { |
| 27 | 23 |
| 28 class UsbDevice; | 24 class UsbDevice; |
| 29 class UsbDeviceFilter; | |
| 30 class UsbDeviceHandle; | |
| 31 | 25 |
| 32 namespace usb { | 26 namespace usb { |
| 33 | 27 |
| 34 class PermissionProvider; | 28 class PermissionProvider; |
| 35 | 29 |
| 36 // Implementation of the public DeviceManager interface. This interface can be | 30 // Implementation of the public DeviceManager interface. This interface can be |
| 37 // requested from the devices app located at "devices", if available. | 31 // requested from the devices app located at "devices", if available. |
| 38 class DeviceManagerImpl : public DeviceManager, public UsbService::Observer { | 32 class DeviceManagerImpl : public DeviceManager, public UsbService::Observer { |
| 39 public: | 33 public: |
| 40 static void Create(base::WeakPtr<PermissionProvider> permission_provider, | 34 static void Create(base::WeakPtr<PermissionProvider> permission_provider, |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 72 |
| 79 base::WeakPtrFactory<DeviceManagerImpl> weak_factory_; | 73 base::WeakPtrFactory<DeviceManagerImpl> weak_factory_; |
| 80 | 74 |
| 81 DISALLOW_COPY_AND_ASSIGN(DeviceManagerImpl); | 75 DISALLOW_COPY_AND_ASSIGN(DeviceManagerImpl); |
| 82 }; | 76 }; |
| 83 | 77 |
| 84 } // namespace usb | 78 } // namespace usb |
| 85 } // namespace device | 79 } // namespace device |
| 86 | 80 |
| 87 #endif // DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_ | 81 #endif // DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_ |
| OLD | NEW |