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

Unified Diff: extensions/browser/api/usb_private/usb_private_api.h

Issue 463493006: Add chrome.usbPrivate API for use by USB device WEBUI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change "Google Inc." to "Test Manufacturer". Created 6 years, 4 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 | « extensions/browser/api/usb_private/DEPS ('k') | extensions/browser/api/usb_private/usb_private_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/usb_private/usb_private_api.h
diff --git a/extensions/browser/api/usb_private/usb_private_api.h b/extensions/browser/api/usb_private/usb_private_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..f91ce7cdb9c472619bb07b4c3c05c67af834dccf
--- /dev/null
+++ b/extensions/browser/api/usb_private/usb_private_api.h
@@ -0,0 +1,49 @@
+// Copyright 2014 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 EXTENSIONS_BROWSER_API_USB_USB_PRIVATE_API_H_
+#define EXTENSIONS_BROWSER_API_USB_USB_PRIVATE_API_H_
+
+#include "extensions/browser/api/usb/usb_api.h"
+#include "extensions/common/api/usb_private.h"
+
+namespace extensions {
+
+class UsbPrivateGetDevicesFunction : public UsbAsyncApiFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("usbPrivate.getDevices", USBPRIVATE_GETDEVICES)
+
+ UsbPrivateGetDevicesFunction();
+
+ virtual bool Prepare() OVERRIDE;
+ virtual void AsyncWorkStart() OVERRIDE;
+
+ protected:
+ virtual ~UsbPrivateGetDevicesFunction();
+
+ private:
+ scoped_ptr<extensions::core_api::usb_private::GetDevices::Params> parameters_;
+};
+
+class UsbPrivateGetDeviceInfoFunction : public UsbAsyncApiFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("usbPrivate.getDeviceInfo",
+ USBPRIVATE_GETDEVICEINFO)
+
+ UsbPrivateGetDeviceInfoFunction();
+
+ virtual bool Prepare() OVERRIDE;
+ virtual void AsyncWorkStart() OVERRIDE;
+
+ protected:
+ virtual ~UsbPrivateGetDeviceInfoFunction();
+
+ private:
+ scoped_ptr<extensions::core_api::usb_private::GetDeviceInfo::Params>
+ parameters_;
+};
+
+} // namespace extensions
+
+#endif // EXTENSIONS_BROWSER_API_USB_USB_API_H_
« no previous file with comments | « extensions/browser/api/usb_private/DEPS ('k') | extensions/browser/api/usb_private/usb_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698