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

Unified Diff: device/usb/usb_device.h

Issue 601073002: Move string descriptor getters from UsbDeviceHandle to UsbDevice. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix function order. Created 6 years, 3 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 | « device/test/usb_test_gadget_impl.cc ('k') | device/usb/usb_device_filter_unittest.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 f4bd5915467086be66671c7751e6347770d141f8..7ea964cce57ad0dab217f23e6cfe31459c503dff 100644
--- a/device/usb/usb_device.h
+++ b/device/usb/usb_device.h
@@ -9,6 +9,7 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
+#include "base/strings/string16.h"
namespace device {
@@ -54,6 +55,18 @@ class UsbDevice : public base::RefCountedThreadSafe<UsbDevice> {
// Blocking method. Must be called on FILE thread.
virtual const UsbConfigDescriptor& GetConfiguration() = 0;
+ // Gets the manufacturer string of the device, or returns false.
+ // Blocking method. Must be called on FILE thread.
+ virtual bool GetManufacturer(base::string16* manufacturer) = 0;
+
+ // Gets the product string of the device, or returns false.
+ // Blocking method. Must be called on FILE thread.
+ virtual bool GetProduct(base::string16* product) = 0;
+
+ // Gets the serial number string of the device, or returns false.
+ // Blocking method. Must be called on FILE thread.
+ virtual bool GetSerialNumber(base::string16* serial) = 0;
+
void AddObserver(Observer* obs) { observer_list_.AddObserver(obs); }
void RemoveObserver(Observer* obs) { observer_list_.RemoveObserver(obs); }
« no previous file with comments | « device/test/usb_test_gadget_impl.cc ('k') | device/usb/usb_device_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698