OLD | NEW |
| (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 #include "device/core/mock_device_client.h" | |
6 | |
7 #include "device/hid/mock_hid_service.h" | |
8 #include "device/usb/mock_usb_service.h" | |
9 | |
10 namespace device { | |
11 | |
12 MockDeviceClient::MockDeviceClient() {} | |
13 | |
14 MockDeviceClient::~MockDeviceClient() {} | |
15 | |
16 HidService* MockDeviceClient::GetHidService() { | |
17 return hid_service(); | |
18 } | |
19 | |
20 UsbService* MockDeviceClient::GetUsbService() { | |
21 return usb_service(); | |
22 } | |
23 | |
24 MockHidService* MockDeviceClient::hid_service() { | |
25 if (!hid_service_) | |
26 hid_service_.reset(new MockHidService()); | |
27 return hid_service_.get(); | |
28 } | |
29 | |
30 MockUsbService* MockDeviceClient::usb_service() { | |
31 if (!usb_service_) | |
32 usb_service_.reset(new MockUsbService()); | |
33 return usb_service_.get(); | |
34 } | |
35 | |
36 } // namespace device | |
OLD | NEW |