Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(550)

Unified Diff: extensions/browser/api/usb/usb_api.h

Issue 558373002: Add chrome.usb.getConfiguration and expose extra descriptors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased to tip of tree. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | extensions/browser/api/usb/usb_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/usb/usb_api.h
diff --git a/extensions/browser/api/usb/usb_api.h b/extensions/browser/api/usb/usb_api.h
index 2a0a6eff937bc6212e1e5e3c2c3cce0b90af25d7..8bd673f509b5051c4af67a2e939f0b17f4d5e177 100644
--- a/extensions/browser/api/usb/usb_api.h
+++ b/extensions/browser/api/usb/usb_api.h
@@ -144,6 +144,22 @@ class UsbOpenDeviceFunction : public UsbAsyncApiFunction {
scoped_ptr<extensions::core_api::usb::OpenDevice::Params> parameters_;
};
+class UsbGetConfigurationFunction : public UsbAsyncApiFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("usb.getConfiguration", USB_GETCONFIGURATION)
+
+ UsbGetConfigurationFunction();
+
+ protected:
+ virtual ~UsbGetConfigurationFunction();
+
+ virtual bool Prepare() OVERRIDE;
+ virtual void AsyncWorkStart() OVERRIDE;
+
+ private:
+ scoped_ptr<extensions::core_api::usb::GetConfiguration::Params> parameters_;
+};
+
class UsbListInterfacesFunction : public UsbAsyncApiFunction {
public:
DECLARE_EXTENSION_FUNCTION("usb.listInterfaces", USB_LISTINTERFACES)
@@ -157,17 +173,6 @@ class UsbListInterfacesFunction : public UsbAsyncApiFunction {
virtual void AsyncWorkStart() OVERRIDE;
private:
- bool ConvertDirectionSafely(const device::UsbEndpointDirection& input,
- extensions::core_api::usb::Direction* output);
- bool ConvertSynchronizationTypeSafely(
- const device::UsbSynchronizationType& input,
- extensions::core_api::usb::SynchronizationType* output);
- bool ConvertTransferTypeSafely(
- const device::UsbTransferType& input,
- extensions::core_api::usb::TransferType* output);
- bool ConvertUsageTypeSafely(const device::UsbUsageType& input,
- extensions::core_api::usb::UsageType* output);
-
scoped_ptr<extensions::core_api::usb::ListInterfaces::Params> parameters_;
};
« no previous file with comments | « no previous file | extensions/browser/api/usb/usb_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698