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

Side by Side Diff: device/usb/device_impl.h

Issue 1155163008: Build a basic Mojo service framework for device/usb (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DISALLOW 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/usb/BUILD.gn ('k') | device/usb/device_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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_USB_DEVICE_IMPL_H_
6 #define DEVICE_USB_DEVICE_IMPL_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "device/usb/public/interfaces/device.mojom.h"
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
12 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
13
14 namespace device {
15
16 class UsbDevice;
17
18 namespace usb {
19
20 // Implementation of the public Device interface. Instances of this class are
21 // constructed by DeviceManagerImpl and are strongly bound to their MessagePipe
22 // lifetime.
23 class DeviceImpl : public Device {
24 public:
25 DeviceImpl(scoped_refptr<UsbDevice> device,
26 mojo::InterfaceRequest<Device> request);
27 ~DeviceImpl() override;
28
29 private:
30 // Device implementation:
31 void GetDeviceInfo(const GetDeviceInfoCallback& callback) override;
32
33 mojo::StrongBinding<Device> binding_;
34
35 scoped_refptr<UsbDevice> device_;
36 DeviceInfoPtr info_;
37
38 DISALLOW_COPY_AND_ASSIGN(DeviceImpl);
39 };
40
41 } // namespace usb
42 } // namespace device
43
44 #endif // DEVICE_USB_DEVICE_IMPL_H_
OLDNEW
« no previous file with comments | « device/usb/BUILD.gn ('k') | device/usb/device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698