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

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

Issue 1695643002: Destroy DeviceImpl when the underlying UsbDevice is disconnected. (Closed) Base URL: reillyg-linux.mtv.corp.google.com:/src/chromium/src@mojo_device_autoclose
Patch Set: Revert change to web_usb_device_impl.cc. Created 4 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 | « no previous file | device/usb/mock_usb_device.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 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
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_
OLDNEW
« no previous file with comments | « no previous file | device/usb/mock_usb_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698