Index: device/usb/usb_device_win.h |
diff --git a/device/usb/usb_device_win.h b/device/usb/usb_device_win.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0a74c06cf00edb2bae5fc0dcbc56fbd3fd0cfb4e |
--- /dev/null |
+++ b/device/usb/usb_device_win.h |
@@ -0,0 +1,55 @@ |
+// Copyright 2017 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 DEVICE_USB_USB_DEVICE_WIN_H_ |
+#define DEVICE_USB_USB_DEVICE_WIN_H_ |
+ |
+#include <string> |
+ |
+#include "base/macros.h" |
+#include "base/threading/thread_checker.h" |
+#include "device/usb/usb_device.h" |
+ |
+namespace base { |
+class SequencedTaskRunner; |
+} |
+ |
+namespace device { |
+ |
+class UsbDeviceWin : public UsbDevice { |
+ public: |
+ // UsbDevice implementation: |
+ void Open(const OpenCallback& callback) override; |
+ |
+ protected: |
+ friend class UsbServiceWin; |
+ friend class UsbDeviceHandleWin; |
+ |
+ // Called by UsbServiceWin only; |
+ UsbDeviceWin(const std::string& device_path, |
+ const std::string& hub_path, |
+ int port_number, |
+ scoped_refptr<base::SequencedTaskRunner> task_runner); |
+ |
+ ~UsbDeviceWin() override; |
+ |
+ const std::string& device_path() const { return device_path_; } |
+ int port_number() const { return port_number_; } |
+ |
+ private: |
+ base::ThreadChecker thread_checker_; |
+ |
+ const std::string device_path_; |
+ const std::string hub_path_; |
+ const int port_number_; |
+ |
+ scoped_refptr<base::SequencedTaskRunner> task_runner_; |
+ scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(UsbDeviceWin); |
+}; |
+ |
+} // namespace device |
+ |
+#endif // DEVICE_USB_USB_DEVICE_WIN_H_ |