reillyg | e471fab | 2014-08-29 01:58:43 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef DEVICE_CORE_DEVICE_CLIENT_H_ |
| 6 | #define DEVICE_CORE_DEVICE_CLIENT_H_ |
| 7 | |
| 8 | #include "base/macros.h" |
| 9 | |
reillyg | e471fab | 2014-08-29 01:58:43 | [diff] [blame] | 10 | namespace device { |
| 11 | |
reillyg | d77718d | 2014-09-04 00:57:56 | [diff] [blame^] | 12 | class UsbService; |
| 13 | |
reillyg | e471fab | 2014-08-29 01:58:43 | [diff] [blame] | 14 | // 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 | // //chrome/browser/chrome_device_client.h. |
| 17 | class DeviceClient { |
| 18 | public: |
| 19 | // Construction sets the single instance. |
| 20 | DeviceClient(); |
| 21 | |
| 22 | // Destruction clears the single instance. |
| 23 | ~DeviceClient(); |
| 24 | |
| 25 | // Returns the single instance of |this|. |
| 26 | static DeviceClient* Get(); |
| 27 | |
| 28 | // Returns the UsbService instance for this embedder. |
reillyg | d77718d | 2014-09-04 00:57:56 | [diff] [blame^] | 29 | virtual UsbService* GetUsbService(); |
reillyg | e471fab | 2014-08-29 01:58:43 | [diff] [blame] | 30 | |
| 31 | private: |
| 32 | DISALLOW_COPY_AND_ASSIGN(DeviceClient); |
| 33 | }; |
| 34 | |
| 35 | } // namespace device |
| 36 | |
| 37 | #endif // DEVICE_CORE_DEVICE_CLIENT_H_ |