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

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

Issue 1784733002: Track USB device configuration state in Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blink_open_state
Patch Set: Rebased. Created 4 years, 9 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 | « content/renderer/usb/web_usb_device_impl.cc ('k') | device/usb/mojo/device_impl.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_MOCK_USB_DEVICE_H_ 5 #ifndef DEVICE_USB_MOCK_USB_DEVICE_H_
6 #define DEVICE_USB_MOCK_USB_DEVICE_H_ 6 #define DEVICE_USB_MOCK_USB_DEVICE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 23 matching lines...) Expand all
34 uint16_t product_id, 34 uint16_t product_id,
35 const UsbConfigDescriptor& configuration); 35 const UsbConfigDescriptor& configuration);
36 MockUsbDevice(uint16_t vendor_id, 36 MockUsbDevice(uint16_t vendor_id,
37 uint16_t product_id, 37 uint16_t product_id,
38 const std::string& manufacturer_string, 38 const std::string& manufacturer_string,
39 const std::string& product_string, 39 const std::string& product_string,
40 const std::string& serial_number, 40 const std::string& serial_number,
41 const std::vector<UsbConfigDescriptor>& configurations); 41 const std::vector<UsbConfigDescriptor>& configurations);
42 42
43 MOCK_METHOD1(Open, void(const OpenCallback&)); 43 MOCK_METHOD1(Open, void(const OpenCallback&));
44 MOCK_METHOD0(GetActiveConfiguration, const device::UsbConfigDescriptor*()); 44 MOCK_CONST_METHOD0(GetActiveConfiguration,
45 const device::UsbConfigDescriptor*());
45 46
46 // Public wrapper around UsbDevice::NotifyDeviceRemoved(). 47 // Public wrapper around UsbDevice::NotifyDeviceRemoved().
47 void NotifyDeviceRemoved(); 48 void NotifyDeviceRemoved();
48 49
49 private: 50 private:
50 ~MockUsbDevice() override; 51 ~MockUsbDevice() override;
51 }; 52 };
52 53
53 } // namespace device 54 } // namespace device
54 55
55 #endif // DEVICE_USB_MOCK_USB_DEVICE_H_ 56 #endif // DEVICE_USB_MOCK_USB_DEVICE_H_
OLDNEW
« no previous file with comments | « content/renderer/usb/web_usb_device_impl.cc ('k') | device/usb/mojo/device_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698