OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CORE_DEVICE_CLIENT_H_ | 5 #ifndef DEVICE_CORE_DEVICE_CLIENT_H_ |
6 #define DEVICE_CORE_DEVICE_CLIENT_H_ | 6 #define DEVICE_CORE_DEVICE_CLIENT_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 | 9 |
10 namespace device { | 10 namespace device { |
11 | 11 |
| 12 class HidService; |
12 class UsbService; | 13 class UsbService; |
13 | 14 |
14 // Interface used by consumers of //device APIs to get pointers to the service | 15 // Interface used by consumers of //device APIs to get pointers to the service |
15 // singletons appropriate for a given embedding application. For an example see | 16 // singletons appropriate for a given embedding application. For an example see |
16 // //chrome/browser/chrome_device_client.h. | 17 // //chrome/browser/chrome_device_client.h. |
17 class DeviceClient { | 18 class DeviceClient { |
18 public: | 19 public: |
19 // Construction sets the single instance. | 20 // Construction sets the single instance. |
20 DeviceClient(); | 21 DeviceClient(); |
21 | 22 |
22 // Destruction clears the single instance. | 23 // Destruction clears the single instance. |
23 ~DeviceClient(); | 24 ~DeviceClient(); |
24 | 25 |
25 // Returns the single instance of |this|. | 26 // Returns the single instance of |this|. |
26 static DeviceClient* Get(); | 27 static DeviceClient* Get(); |
27 | 28 |
28 // Returns the UsbService instance for this embedder. | 29 // Returns the UsbService instance for this embedder. |
29 virtual UsbService* GetUsbService(); | 30 virtual UsbService* GetUsbService(); |
30 | 31 |
| 32 // Returns the HidService instance for this embedder. |
| 33 virtual HidService* GetHidService(); |
| 34 |
31 private: | 35 private: |
32 DISALLOW_COPY_AND_ASSIGN(DeviceClient); | 36 DISALLOW_COPY_AND_ASSIGN(DeviceClient); |
33 }; | 37 }; |
34 | 38 |
35 } // namespace device | 39 } // namespace device |
36 | 40 |
37 #endif // DEVICE_CORE_DEVICE_CLIENT_H_ | 41 #endif // DEVICE_CORE_DEVICE_CLIENT_H_ |
OLD | NEW |