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

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

Issue 1144493003: Extract //device/usb mocks so that they can be shared. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android and GN builds for real. Created 5 years, 7 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/mock_usb_device_handle.cc ('k') | device/usb/mock_usb_service.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 2015 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_MOCK_USB_SERVICE_H_
6 #define DEVICE_USB_MOCK_USB_SERVICE_H_
7
8 #include "device/usb/usb_service.h"
9
10 #include "testing/gmock/include/gmock/gmock.h"
11
12 namespace device {
13
14 class MockUsbService : public UsbService {
15 public:
16 MockUsbService();
17 ~MockUsbService() override;
18
19 void AddDevice(scoped_refptr<UsbDevice> device);
20 void RemoveDevice(scoped_refptr<UsbDevice> device);
21
22 protected:
23 // UsbService implementation:
24 scoped_refptr<UsbDevice> GetDeviceById(uint32 unique_id) override;
25 void GetDevices(const GetDevicesCallback& callback) override;
26
27 std::map<uint32, scoped_refptr<UsbDevice>> devices_;
28 };
29
30 } // namespace device
31
32 #endif // DEVICE_USB_MOCK_USB_SERVICE_H_
OLDNEW
« no previous file with comments | « device/usb/mock_usb_device_handle.cc ('k') | device/usb/mock_usb_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698