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/usb/usb_service.h" | 5 #include "device/usb/usb_service.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <queue> | 8 #include <queue> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 typedef struct libusb_context* PlatformUsbContext; | 32 typedef struct libusb_context* PlatformUsbContext; |
33 | 33 |
34 class UsbServiceImpl : | 34 class UsbServiceImpl : |
35 #if defined(OS_WIN) | 35 #if defined(OS_WIN) |
36 public DeviceMonitorWin::Observer, | 36 public DeviceMonitorWin::Observer, |
37 #endif // OS_WIN | 37 #endif // OS_WIN |
38 public UsbService { | 38 public UsbService { |
39 public: | 39 public: |
40 explicit UsbServiceImpl( | 40 explicit UsbServiceImpl( |
41 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner); | 41 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner); |
| 42 ~UsbServiceImpl() override; |
42 | 43 |
43 private: | 44 private: |
44 ~UsbServiceImpl() override; | |
45 | |
46 // device::UsbService implementation | 45 // device::UsbService implementation |
47 scoped_refptr<UsbDevice> GetDevice(const std::string& guid) override; | 46 scoped_refptr<UsbDevice> GetDevice(const std::string& guid) override; |
48 void GetDevices(const GetDevicesCallback& callback) override; | 47 void GetDevices(const GetDevicesCallback& callback) override; |
49 | 48 |
50 #if defined(OS_WIN) | 49 #if defined(OS_WIN) |
51 // device::DeviceMonitorWin::Observer implementation | 50 // device::DeviceMonitorWin::Observer implementation |
52 void OnDeviceAdded(const GUID& class_guid, | 51 void OnDeviceAdded(const GUID& class_guid, |
53 const std::string& device_path) override; | 52 const std::string& device_path) override; |
54 void OnDeviceRemoved(const GUID& class_guid, | 53 void OnDeviceRemoved(const GUID& class_guid, |
55 const std::string& device_path) override; | 54 const std::string& device_path) override; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 #if defined(OS_WIN) | 108 #if defined(OS_WIN) |
110 ScopedObserver<DeviceMonitorWin, DeviceMonitorWin::Observer> device_observer_; | 109 ScopedObserver<DeviceMonitorWin, DeviceMonitorWin::Observer> device_observer_; |
111 #endif // OS_WIN | 110 #endif // OS_WIN |
112 | 111 |
113 base::WeakPtrFactory<UsbServiceImpl> weak_factory_; | 112 base::WeakPtrFactory<UsbServiceImpl> weak_factory_; |
114 | 113 |
115 DISALLOW_COPY_AND_ASSIGN(UsbServiceImpl); | 114 DISALLOW_COPY_AND_ASSIGN(UsbServiceImpl); |
116 }; | 115 }; |
117 | 116 |
118 } // namespace device | 117 } // namespace device |
OLD | NEW |