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> |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 class UsbDevice; | 28 class UsbDevice; |
29 class UsbDeviceFilter; | 29 class UsbDeviceFilter; |
30 class UsbDeviceHandle; | 30 class UsbDeviceHandle; |
31 | 31 |
32 namespace usb { | 32 namespace usb { |
33 | 33 |
34 class PermissionProvider; | 34 class PermissionProvider; |
35 | 35 |
36 // Implementation of the public DeviceManager interface. This interface can be | 36 // Implementation of the public DeviceManager interface. This interface can be |
37 // requested from the devices app located at "mojo:devices", if available. | 37 // requested from the devices app located at "service:devices", if available. |
38 class DeviceManagerImpl : public DeviceManager, public UsbService::Observer { | 38 class DeviceManagerImpl : public DeviceManager, public UsbService::Observer { |
39 public: | 39 public: |
40 static void Create(base::WeakPtr<PermissionProvider> permission_provider, | 40 static void Create(base::WeakPtr<PermissionProvider> permission_provider, |
41 mojo::InterfaceRequest<DeviceManager> request); | 41 mojo::InterfaceRequest<DeviceManager> request); |
42 | 42 |
43 DeviceManagerImpl(base::WeakPtr<PermissionProvider> permission_provider, | 43 DeviceManagerImpl(base::WeakPtr<PermissionProvider> permission_provider, |
44 UsbService* usb_service); | 44 UsbService* usb_service); |
45 ~DeviceManagerImpl() override; | 45 ~DeviceManagerImpl() override; |
46 | 46 |
47 void set_connection_error_handler(const base::Closure& error_handler) { | 47 void set_connection_error_handler(const base::Closure& error_handler) { |
(...skipping 30 matching lines...) Expand all Loading... |
78 | 78 |
79 base::WeakPtrFactory<DeviceManagerImpl> weak_factory_; | 79 base::WeakPtrFactory<DeviceManagerImpl> weak_factory_; |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(DeviceManagerImpl); | 81 DISALLOW_COPY_AND_ASSIGN(DeviceManagerImpl); |
82 }; | 82 }; |
83 | 83 |
84 } // namespace usb | 84 } // namespace usb |
85 } // namespace device | 85 } // namespace device |
86 | 86 |
87 #endif // DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_ | 87 #endif // DEVICE_USB_MOJO_DEVICE_MANAGER_IMPL_H_ |
OLD | NEW |