| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Use the <code>chrome.usb</code> module to interact with connected USB |
| 6 // devices. This API provides access to USB operations from within the context |
| 7 // of an app. Using this API, apps can function as drivers for hardware devices. |
| 5 namespace usb { | 8 namespace usb { |
| 6 | 9 |
| 7 // Direction, Recipient and RequestType all map to their namesakes within the | 10 // Direction, Recipient and RequestType all map to their namesakes within the |
| 8 // USB specification. | 11 // USB specification. |
| 9 enum Direction {in, out}; | 12 enum Direction {in, out}; |
| 10 enum Recipient {device, _interface, endpoint, other}; | 13 enum Recipient {device, _interface, endpoint, other}; |
| 11 enum RequestType {standard, class, vendor, reserved}; | 14 enum RequestType {standard, class, vendor, reserved}; |
| 12 | 15 |
| 13 // A Device encapsulates everything that is needed to communicate with a USB | 16 // A Device encapsulates everything that is needed to communicate with a USB |
| 14 // device. They are returned by findDevice calls and have all of their | 17 // device. They are returned by findDevice calls and have all of their |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // will appear to be disconected and reconnected. | 182 // will appear to be disconected and reconnected. |
| 180 // You must call <code>findDevice</code> again to acquire the device. | 183 // You must call <code>findDevice</code> again to acquire the device. |
| 181 // | 184 // |
| 182 // |device|: An opened device to reset. | 185 // |device|: An opened device to reset. |
| 183 // |callback|: Invoked once the device is reset with a boolean indicating | 186 // |callback|: Invoked once the device is reset with a boolean indicating |
| 184 // whether the reset is completed successfully. | 187 // whether the reset is completed successfully. |
| 185 static void resetDevice(Device device, | 188 static void resetDevice(Device device, |
| 186 ResetDeviceCallback callback); | 189 ResetDeviceCallback callback); |
| 187 }; | 190 }; |
| 188 }; | 191 }; |
| OLD | NEW |