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

Unified Diff: public/platform/modules/webusb/WebUSBClient.h

Issue 1245363002: Add WebUSB bindings and client interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: iface ctors, OWNERS, rebase Created 5 years, 5 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 | « Source/web/WebLocalFrameImpl.cpp ('k') | public/platform/modules/webusb/WebUSBDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..dece4646a66a99aad35cbd7adde0c4565b26b26f
--- /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;
+
+typedef WebCallbacks<WebVector<WebUSBDevice*>*, WebUSBError*> WebUSBClientGetDevicesCallbacks;
+
+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
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | public/platform/modules/webusb/WebUSBDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698