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