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

Side by Side Diff: device/test/test_device_client.h

Issue 2885143002: Use the task scheduler in the new Windows USB backend (Closed)
Patch Set: Created 3 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
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 #include <memory> 5 #include <memory>
6 6
7 #include "base/memory/ref_counted.h"
8 #include "device/base/device_client.h" 7 #include "device/base/device_client.h"
9 8
10 namespace base {
11 class SingleThreadTaskRunner;
12 }
13
14 namespace device { 9 namespace device {
15 10
16 class HidService; 11 class HidService;
17 class UsbService; 12 class UsbService;
18 13
19 class TestDeviceClient : public DeviceClient { 14 class TestDeviceClient : public DeviceClient {
20 public: 15 public:
21 TestDeviceClient(scoped_refptr<base::SingleThreadTaskRunner> task_runner); 16 TestDeviceClient();
22 17
23 // Must be destroyed when tasks can still be posted to |task_runner|. 18 // Must be destroyed when tasks can still be posted to |task_runner|.
24 ~TestDeviceClient() override; 19 ~TestDeviceClient() override;
25 20
26 HidService* GetHidService() override; 21 HidService* GetHidService() override;
27 UsbService* GetUsbService() override; 22 UsbService* GetUsbService() override;
28 23
29 private: 24 private:
30 std::unique_ptr<HidService> hid_service_; 25 std::unique_ptr<HidService> hid_service_;
31 std::unique_ptr<UsbService> usb_service_; 26 std::unique_ptr<UsbService> usb_service_;
32 scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner_;
33 }; 27 };
34 28
35 } // namespace device 29 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698