Index: public/platform/modules/webusb/WebUSBClient.h |
diff --git a/public/platform/modules/webusb/WebUSBClient.h b/public/platform/modules/webusb/WebUSBClient.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..abe38f93b86a9e14927e3c782dea5b85ef2219ab |
--- /dev/null |
+++ b/public/platform/modules/webusb/WebUSBClient.h |
@@ -0,0 +1,30 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef WebUSBClient_h |
+#define WebUSBClient_h |
+ |
+#include "public/platform/WebCallbacks.h" |
+#include "public/platform/WebVector.h" |
+ |
+namespace blink { |
+ |
+class WebUSBDevice; |
+struct WebUSBDeviceEnumerationOptions; |
+struct WebUSBError; |
+ |
+using WebUSBClientGetDevicesCallbacks = WebCallbacks<WebVector<WebUSBDevice*>*, WebUSBError*>; |
+ |
+class WebUSBClient { |
+public: |
+ virtual ~WebUSBClient() { } |
+ |
+ // Enumerates available devices. |
+ // Ownership of the WebUSBClientGetDevicesCallbacks is transferred to the client. |
+ virtual void getDevices(const WebUSBDeviceEnumerationOptions&, WebUSBClientGetDevicesCallbacks*) = 0; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // WebUSBClient_h |