blob: c1421fde4d1d8d9d3a8854df302cbf6eb586af9e [file] [log] [blame]
reillyge471fab2014-08-29 01:58:431// 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
alexis.menard2fe63eaa2016-10-13 21:42:435#ifndef DEVICE_BASE_DEVICE_CLIENT_H_
6#define DEVICE_BASE_DEVICE_CLIENT_H_
reillyge471fab2014-08-29 01:58:437
8#include "base/macros.h"
alexis.menard2fe63eaa2016-10-13 21:42:439#include "device/base/device_base_export.h"
reillyge471fab2014-08-29 01:58:4310
reillyge471fab2014-08-29 01:58:4311namespace device {
12
rockot1a51b922014-09-05 08:02:4413class HidService;
reillygd77718d2014-09-04 00:57:5614class UsbService;
15
reillyge471fab2014-08-29 01:58:4316// 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
18// //chrome/browser/chrome_device_client.h.
alexis.menard2fe63eaa2016-10-13 21:42:4319class DEVICE_BASE_EXPORT DeviceClient {
reillyge471fab2014-08-29 01:58:4320 public:
21 // Construction sets the single instance.
22 DeviceClient();
23
24 // Destruction clears the single instance.
rockot8fcc2752015-05-28 02:07:5525 virtual ~DeviceClient();
reillyge471fab2014-08-29 01:58:4326
27 // Returns the single instance of |this|.
28 static DeviceClient* Get();
29
30 // Returns the UsbService instance for this embedder.
reillygd77718d2014-09-04 00:57:5631 virtual UsbService* GetUsbService();
reillyge471fab2014-08-29 01:58:4332
rockot1a51b922014-09-05 08:02:4433 // Returns the HidService instance for this embedder.
34 virtual HidService* GetHidService();
35
reillyge471fab2014-08-29 01:58:4336 private:
37 DISALLOW_COPY_AND_ASSIGN(DeviceClient);
38};
39
40} // namespace device
41
alexis.menard2fe63eaa2016-10-13 21:42:4342#endif // DEVICE_BASE_DEVICE_CLIENT_H_