| 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 #ifndef DEVICE_USB_USB_DEVICE_H_ | 5 #ifndef DEVICE_USB_USB_DEVICE_H_ |
| 6 #define DEVICE_USB_USB_DEVICE_H_ | 6 #define DEVICE_USB_USB_DEVICE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 base::string16 manufacturer_string_; | 125 base::string16 manufacturer_string_; |
| 126 base::string16 product_string_; | 126 base::string16 product_string_; |
| 127 base::string16 serial_number_; | 127 base::string16 serial_number_; |
| 128 std::unique_ptr<WebUsbAllowedOrigins> webusb_allowed_origins_; | 128 std::unique_ptr<WebUsbAllowedOrigins> webusb_allowed_origins_; |
| 129 GURL webusb_landing_page_; | 129 GURL webusb_landing_page_; |
| 130 | 130 |
| 131 private: | 131 private: |
| 132 friend class base::RefCountedThreadSafe<UsbDevice>; | 132 friend class base::RefCountedThreadSafe<UsbDevice>; |
| 133 friend class UsbDeviceHandleImpl; | 133 friend class UsbDeviceHandleImpl; |
| 134 friend class UsbDeviceHandleUsbfs; | 134 friend class UsbDeviceHandleUsbfs; |
| 135 friend class UsbDeviceHandleWin; |
| 135 friend class UsbServiceAndroid; | 136 friend class UsbServiceAndroid; |
| 136 friend class UsbServiceImpl; | 137 friend class UsbServiceImpl; |
| 137 friend class UsbServiceLinux; | 138 friend class UsbServiceLinux; |
| 138 friend class UsbServiceWin; | 139 friend class UsbServiceWin; |
| 139 | 140 |
| 140 void OnDisconnect(); | 141 void OnDisconnect(); |
| 141 void HandleClosed(UsbDeviceHandle* handle); | 142 void HandleClosed(UsbDeviceHandle* handle); |
| 142 | 143 |
| 143 const std::string guid_; | 144 const std::string guid_; |
| 144 | 145 |
| 145 // The current device configuration descriptor. May be null if the device is | 146 // The current device configuration descriptor. May be null if the device is |
| 146 // in an unconfigured state; if not null, it is a pointer to one of the | 147 // in an unconfigured state; if not null, it is a pointer to one of the |
| 147 // items in |descriptor_.configurations|. | 148 // items in |descriptor_.configurations|. |
| 148 const UsbConfigDescriptor* active_configuration_ = nullptr; | 149 const UsbConfigDescriptor* active_configuration_ = nullptr; |
| 149 | 150 |
| 150 // Weak pointers to open handles. HandleClosed() will be called before each | 151 // Weak pointers to open handles. HandleClosed() will be called before each |
| 151 // is freed. | 152 // is freed. |
| 152 std::list<UsbDeviceHandle*> handles_; | 153 std::list<UsbDeviceHandle*> handles_; |
| 153 | 154 |
| 154 base::ObserverList<Observer, true> observer_list_; | 155 base::ObserverList<Observer, true> observer_list_; |
| 155 | 156 |
| 156 DISALLOW_COPY_AND_ASSIGN(UsbDevice); | 157 DISALLOW_COPY_AND_ASSIGN(UsbDevice); |
| 157 }; | 158 }; |
| 158 | 159 |
| 159 } // namespace device | 160 } // namespace device |
| 160 | 161 |
| 161 #endif // DEVICE_USB_USB_DEVICE_H_ | 162 #endif // DEVICE_USB_USB_DEVICE_H_ |
| OLD | NEW |