OLD | NEW |
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 25 matching lines...) Expand all Loading... |
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_METHOD0(GetActiveConfiguration, const device::UsbConfigDescriptor*()); |
45 | 45 |
| 46 // Public wrapper around UsbDevice::NotifyDeviceRemoved(). |
| 47 void NotifyDeviceRemoved(); |
| 48 |
46 private: | 49 private: |
47 ~MockUsbDevice() override; | 50 ~MockUsbDevice() override; |
48 }; | 51 }; |
49 | 52 |
50 } // namespace device | 53 } // namespace device |
51 | 54 |
52 #endif // DEVICE_USB_MOCK_USB_DEVICE_H_ | 55 #endif // DEVICE_USB_MOCK_USB_DEVICE_H_ |
OLD | NEW |