blob: 00fa17902ab70f58e4ea26467a45085fc227f2f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef DEVICE_CORE_DEVICE_CLIENT_H_
#define DEVICE_CORE_DEVICE_CLIENT_H_
#include "base/macros.h"
#include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
namespace device {
class HidService;
class UsbService;
namespace usb {
class DeviceManager;
}
// Interface used by consumers of //device APIs to get pointers to the service
// singletons appropriate for a given embedding application. For an example see
// //chrome/browser/chrome_device_client.h.
class DeviceClient {
public:
// Construction sets the single instance.
DeviceClient();
// Destruction clears the single instance.
virtual ~DeviceClient();
// Returns the single instance of |this|.
static DeviceClient* Get();
// Returns the UsbService instance for this embedder.
virtual UsbService* GetUsbService();
// Connects a USB DeviceManager client to a concrete implementation. If
// no such implementation is available the request is dropped.
virtual void ConnectToUSBDeviceManager(
mojo::InterfaceRequest<usb::DeviceManager> request);
// Returns the HidService instance for this embedder.
virtual HidService* GetHidService();
private:
DISALLOW_COPY_AND_ASSIGN(DeviceClient);
};
} // namespace device
#endif // DEVICE_CORE_DEVICE_CLIENT_H_
|