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

Unified Diff: components/usb_service/usb_device_impl.h

Issue 507503002: Remove BrowserThread dependency from usb_service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move device/common to device/core. 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 | « components/usb_service/usb_device_handle_impl.cc ('k') | components/usb_service/usb_device_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/usb_service/usb_device_impl.h
diff --git a/components/usb_service/usb_device_impl.h b/components/usb_service/usb_device_impl.h
index e27a692853b1c6a740ff7566934a2e501e801103..07711bc2e54f3c6ba947424853bc7a8af58a168a 100644
--- a/components/usb_service/usb_device_impl.h
+++ b/components/usb_service/usb_device_impl.h
@@ -15,6 +15,10 @@
struct libusb_device;
struct libusb_config_descriptor;
+namespace base {
+class SingleThreadTaskRunner;
+}
+
namespace usb_service {
class UsbDeviceHandleImpl;
@@ -40,6 +44,7 @@ class UsbDeviceImpl : public UsbDevice {
// Called by UsbServiceImpl only;
UsbDeviceImpl(scoped_refptr<UsbContext> context,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
PlatformUsbDevice platform_device,
uint16 vendor_id,
uint16 product_id,
@@ -61,6 +66,9 @@ class UsbDeviceImpl : public UsbDevice {
typedef std::vector<scoped_refptr<UsbDeviceHandleImpl> > HandlesVector;
HandlesVector handles_;
+ // Reference to the UI thread for permission-broker calls.
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
+
DISALLOW_COPY_AND_ASSIGN(UsbDeviceImpl);
};
« no previous file with comments | « components/usb_service/usb_device_handle_impl.cc ('k') | components/usb_service/usb_device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698