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

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

Issue 1857033002: Include USB device version in chrome.usb.Device fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 years, 8 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_android.cc ('k') | device/usb/usb_device_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_USB_USB_DEVICE_IMPL_H_ 5 #ifndef DEVICE_USB_USB_DEVICE_IMPL_H_
6 #define DEVICE_USB_USB_DEVICE_IMPL_H_ 6 #define DEVICE_USB_USB_DEVICE_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/threading/thread_checker.h" 16 #include "base/threading/thread_checker.h"
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 #include "device/usb/usb_descriptors.h" 18 #include "device/usb/usb_descriptors.h"
19 #include "device/usb/usb_device.h" 19 #include "device/usb/usb_device.h"
20 #include "device/usb/webusb_descriptors.h" 20 #include "device/usb/webusb_descriptors.h"
21 21
22 struct libusb_device; 22 struct libusb_device;
23 struct libusb_device_descriptor;
24 struct libusb_device_handle;
23 struct libusb_config_descriptor; 25 struct libusb_config_descriptor;
24 struct libusb_device_handle;
25 26
26 namespace base { 27 namespace base {
27 class SequencedTaskRunner; 28 class SequencedTaskRunner;
28 } 29 }
29 30
30 namespace dbus { 31 namespace dbus {
31 class FileDescriptor; 32 class FileDescriptor;
32 } 33 }
33 34
34 namespace device { 35 namespace device {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 70
70 PlatformUsbDevice platform_device() const { return platform_device_; } 71 PlatformUsbDevice platform_device() const { return platform_device_; }
71 72
72 protected: 73 protected:
73 friend class UsbServiceImpl; 74 friend class UsbServiceImpl;
74 friend class UsbDeviceHandleImpl; 75 friend class UsbDeviceHandleImpl;
75 76
76 // Called by UsbServiceImpl only; 77 // Called by UsbServiceImpl only;
77 UsbDeviceImpl(scoped_refptr<UsbContext> context, 78 UsbDeviceImpl(scoped_refptr<UsbContext> context,
78 PlatformUsbDevice platform_device, 79 PlatformUsbDevice platform_device,
79 uint16_t vendor_id, 80 const libusb_device_descriptor& descriptor,
80 uint16_t product_id,
81 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner); 81 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner);
82 82
83 ~UsbDeviceImpl() override; 83 ~UsbDeviceImpl() override;
84 84
85 // Called only by UsbServiceImpl. 85 // Called only by UsbServiceImpl.
86 void set_visited(bool visited) { visited_ = visited; } 86 void set_visited(bool visited) { visited_ = visited; }
87 bool was_visited() const { return visited_; } 87 bool was_visited() const { return visited_; }
88 void OnDisconnect(); 88 void OnDisconnect();
89 void ReadAllConfigurations(); 89 void ReadAllConfigurations();
90 90
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 scoped_refptr<base::SequencedTaskRunner> task_runner_; 130 scoped_refptr<base::SequencedTaskRunner> task_runner_;
131 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 131 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
132 132
133 DISALLOW_COPY_AND_ASSIGN(UsbDeviceImpl); 133 DISALLOW_COPY_AND_ASSIGN(UsbDeviceImpl);
134 }; 134 };
135 135
136 } // namespace device 136 } // namespace device
137 137
138 #endif // DEVICE_USB_USB_DEVICE_IMPL_H_ 138 #endif // DEVICE_USB_USB_DEVICE_IMPL_H_
OLDNEW
« no previous file with comments | « device/usb/usb_device_android.cc ('k') | device/usb/usb_device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698