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

Unified Diff: device/usb/usb_device.h

Issue 1253163005: Try to read BOS and WebUSB descriptors from USB devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 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 | « no previous file | device/usb/usb_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_device.h
diff --git a/device/usb/usb_device.h b/device/usb/usb_device.h
index 21676b64b2ff015c6a48c7a14be6128ec86e2929..33a93d10fd72ff3aab442b6d5ae7286f2b6a4197 100644
--- a/device/usb/usb_device.h
+++ b/device/usb/usb_device.h
@@ -12,10 +12,12 @@
#include "base/memory/ref_counted.h"
#include "base/strings/string16.h"
#include "device/usb/usb_descriptors.h"
+#include "url/gurl.h"
namespace device {
class UsbDeviceHandle;
+struct WebUsbDescriptorSet;
// A UsbDevice object represents a detected USB device, providing basic
// information about it. Methods other than simple property accessors must be
@@ -39,6 +41,10 @@ class UsbDevice : public base::RefCountedThreadSafe<UsbDevice> {
}
const base::string16& product_string() const { return product_string_; }
const base::string16& serial_number() const { return serial_number_; }
+ const WebUsbDescriptorSet* webusb_allowed_origins() const {
+ return webusb_allowed_origins_.get();
+ }
+ const GURL& webusb_landing_page() const { return webusb_landing_page_; }
// On ChromeOS the permission_broker service is used to change the ownership
// of USB device nodes so that Chrome can open them. On other platforms these
@@ -75,6 +81,8 @@ class UsbDevice : public base::RefCountedThreadSafe<UsbDevice> {
base::string16 manufacturer_string_;
base::string16 product_string_;
base::string16 serial_number_;
+ scoped_ptr<WebUsbDescriptorSet> webusb_allowed_origins_;
+ GURL webusb_landing_page_;
// All of the device's configuration descriptors.
std::vector<UsbConfigDescriptor> configurations_;
« no previous file with comments | « no previous file | device/usb/usb_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698