| 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 EXTENSIONS_BROWSER_API_USB_USB_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_USB_USB_API_H_ |
| 6 #define EXTENSIONS_BROWSER_API_USB_USB_API_H_ | 6 #define EXTENSIONS_BROWSER_API_USB_USB_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 DevicePermissionsManager* device_permissions_manager_; | 38 DevicePermissionsManager* device_permissions_manager_; |
| 39 scoped_refptr<DevicePermissionEntry> permission_entry_; | 39 scoped_refptr<DevicePermissionEntry> permission_entry_; |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 class UsbConnectionFunction : public UIThreadExtensionFunction { | 42 class UsbConnectionFunction : public UIThreadExtensionFunction { |
| 43 protected: | 43 protected: |
| 44 UsbConnectionFunction(); | 44 UsbConnectionFunction(); |
| 45 ~UsbConnectionFunction() override; | 45 ~UsbConnectionFunction() override; |
| 46 | 46 |
| 47 scoped_refptr<device::UsbDeviceHandle> GetDeviceHandle( | 47 scoped_refptr<device::UsbDeviceHandle> GetDeviceHandle( |
| 48 const extensions::core_api::usb::ConnectionHandle& handle); | 48 const extensions::api::usb::ConnectionHandle& handle); |
| 49 void ReleaseDeviceHandle( | 49 void ReleaseDeviceHandle( |
| 50 const extensions::core_api::usb::ConnectionHandle& handle); | 50 const extensions::api::usb::ConnectionHandle& handle); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 class UsbTransferFunction : public UsbConnectionFunction { | 53 class UsbTransferFunction : public UsbConnectionFunction { |
| 54 protected: | 54 protected: |
| 55 UsbTransferFunction(); | 55 UsbTransferFunction(); |
| 56 ~UsbTransferFunction() override; | 56 ~UsbTransferFunction() override; |
| 57 | 57 |
| 58 void OnCompleted(device::UsbTransferStatus status, | 58 void OnCompleted(device::UsbTransferStatus status, |
| 59 scoped_refptr<net::IOBuffer> data, | 59 scoped_refptr<net::IOBuffer> data, |
| 60 size_t length); | 60 size_t length); |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 UsbResetDeviceFunction(); | 337 UsbResetDeviceFunction(); |
| 338 | 338 |
| 339 private: | 339 private: |
| 340 ~UsbResetDeviceFunction() override; | 340 ~UsbResetDeviceFunction() override; |
| 341 | 341 |
| 342 // ExtensionFunction: | 342 // ExtensionFunction: |
| 343 ResponseAction Run() override; | 343 ResponseAction Run() override; |
| 344 | 344 |
| 345 void OnComplete(bool success); | 345 void OnComplete(bool success); |
| 346 | 346 |
| 347 scoped_ptr<extensions::core_api::usb::ResetDevice::Params> parameters_; | 347 scoped_ptr<extensions::api::usb::ResetDevice::Params> parameters_; |
| 348 | 348 |
| 349 DISALLOW_COPY_AND_ASSIGN(UsbResetDeviceFunction); | 349 DISALLOW_COPY_AND_ASSIGN(UsbResetDeviceFunction); |
| 350 }; | 350 }; |
| 351 } // namespace extensions | 351 } // namespace extensions |
| 352 | 352 |
| 353 #endif // EXTENSIONS_BROWSER_API_USB_USB_API_H_ | 353 #endif // EXTENSIONS_BROWSER_API_USB_USB_API_H_ |
| OLD | NEW |