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

Side by Side Diff: device/usb/usb_device_win.h

Issue 2690383002: Add device path enumeration to the new Windows USB backend. (Closed)
Patch Set: Fix a comment. Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « device/usb/usb_device.cc ('k') | device/usb/usb_device_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef DEVICE_USB_USB_DEVICE_WIN_H_
6 #define DEVICE_USB_USB_DEVICE_WIN_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "base/threading/thread_checker.h"
12 #include "device/usb/usb_device.h"
13
14 namespace base {
15 class SequencedTaskRunner;
16 }
17
18 namespace device {
19
20 class UsbDeviceWin : public UsbDevice {
21 public:
22 // UsbDevice implementation:
23 void Open(const OpenCallback& callback) override;
24
25 protected:
26 friend class UsbServiceWin;
27 friend class UsbDeviceHandleWin;
28
29 // Called by UsbServiceWin only;
30 UsbDeviceWin(const std::string& device_path,
31 const std::string& hub_path,
32 int port_number,
33 scoped_refptr<base::SequencedTaskRunner> task_runner);
34
35 ~UsbDeviceWin() override;
36
37 const std::string& device_path() const { return device_path_; }
38 int port_number() const { return port_number_; }
39
40 private:
41 base::ThreadChecker thread_checker_;
42
43 const std::string device_path_;
44 const std::string hub_path_;
45 const int port_number_;
46
47 scoped_refptr<base::SequencedTaskRunner> task_runner_;
48 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
49
50 DISALLOW_COPY_AND_ASSIGN(UsbDeviceWin);
51 };
52
53 } // namespace device
54
55 #endif // DEVICE_USB_USB_DEVICE_WIN_H_
OLDNEW
« no previous file with comments | « device/usb/usb_device.cc ('k') | device/usb/usb_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698