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

Unified Diff: Source/modules/webusb/USB.cpp

Issue 1262163003: Add WebUSB bindings and client interface [part 1] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Handle null navigator.frame() without ASSERT 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/modules/webusb/USB.h ('k') | Source/modules/webusb/USB.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webusb/USB.cpp
diff --git a/Source/modules/webusb/USB.cpp b/Source/modules/webusb/USB.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c9ced1e1ab7470cbcad7730505d1e0f3fdaa25e6
--- /dev/null
+++ b/Source/modules/webusb/USB.cpp
@@ -0,0 +1,32 @@
+// 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.
+
+#include "config.h"
+#include "modules/webusb/USB.h"
+
+#include "modules/webusb/USBDeviceEnumerationOptions.h"
+#include "modules/webusb/USBDeviceFilter.h"
+#include "public/platform/modules/webusb/WebUSBClient.h"
+#include "public/platform/modules/webusb/WebUSBDeviceEnumerationOptions.h"
+#include "public/platform/modules/webusb/WebUSBDeviceFilter.h"
+
+namespace blink {
+
+USB::USB(LocalFrame& frame)
+ : m_controller(USBController::from(frame))
+{
+}
+
+ScriptPromise USB::getDevices(ScriptState* scriptState, const USBDeviceEnumerationOptions& options)
+{
+ ASSERT_NOT_REACHED();
+ return ScriptPromise();
+}
+
+DEFINE_TRACE(USB)
+{
+ visitor->trace(m_controller);
+}
+
+} // namespace blink
« no previous file with comments | « Source/modules/webusb/USB.h ('k') | Source/modules/webusb/USB.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698