Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: device/core/device_client.h

Issue 1158323002: Revert of Build a basic Mojo service framework for device/usb (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/core/core.gyp ('k') | device/core/device_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
10 9
11 namespace device { 10 namespace device {
12 11
13 class HidService; 12 class HidService;
14 class UsbService; 13 class UsbService;
15 14
16 namespace usb {
17 class DeviceManager;
18 }
19
20 // 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
21 // singletons appropriate for a given embedding application. For an example see 16 // singletons appropriate for a given embedding application. For an example see
22 // //chrome/browser/chrome_device_client.h. 17 // //chrome/browser/chrome_device_client.h.
23 class DeviceClient { 18 class DeviceClient {
24 public: 19 public:
25 // Construction sets the single instance. 20 // Construction sets the single instance.
26 DeviceClient(); 21 DeviceClient();
27 22
28 // Destruction clears the single instance. 23 // Destruction clears the single instance.
29 virtual ~DeviceClient(); 24 ~DeviceClient();
30 25
31 // Returns the single instance of |this|. 26 // Returns the single instance of |this|.
32 static DeviceClient* Get(); 27 static DeviceClient* Get();
33 28
34 // Returns the UsbService instance for this embedder. 29 // Returns the UsbService instance for this embedder.
35 virtual UsbService* GetUsbService(); 30 virtual UsbService* GetUsbService();
36 31
37 // Connects a USB DeviceManager client to a concrete implementation. If
38 // no such implementation is available the request is dropped.
39 virtual void ConnectToUSBDeviceManager(
40 mojo::InterfaceRequest<usb::DeviceManager> request);
41
42 // Returns the HidService instance for this embedder. 32 // Returns the HidService instance for this embedder.
43 virtual HidService* GetHidService(); 33 virtual HidService* GetHidService();
44 34
45 private: 35 private:
46 DISALLOW_COPY_AND_ASSIGN(DeviceClient); 36 DISALLOW_COPY_AND_ASSIGN(DeviceClient);
47 }; 37 };
48 38
49 } // namespace device 39 } // namespace device
50 40
51 #endif // DEVICE_CORE_DEVICE_CLIENT_H_ 41 #endif // DEVICE_CORE_DEVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « device/core/core.gyp ('k') | device/core/device_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698