| OLD | NEW |
| (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_PUBLIC_CPP_DEVICE_MANAGER_FACTORY_H_ | |
| 6 #define DEVICE_USB_PUBLIC_CPP_DEVICE_MANAGER_FACTORY_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "device/usb/public/interfaces/device_manager.mojom.h" | |
| 11 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" | |
| 12 | |
| 13 namespace device { | |
| 14 namespace usb { | |
| 15 | |
| 16 class DeviceManagerDelegate; | |
| 17 | |
| 18 // Public interface to construct an implementation of the DeviceManager service. | |
| 19 class DeviceManagerFactory { | |
| 20 public: | |
| 21 // Builds a new DeviceManager instance to fulfill a request. The service is | |
| 22 // bound to the lifetime of |request|'s MessagePipe, and it takes ownership of | |
| 23 // |delegate|. | |
| 24 static void Build(mojo::InterfaceRequest<DeviceManager> request, | |
| 25 scoped_ptr<DeviceManagerDelegate> delegate); | |
| 26 | |
| 27 private: | |
| 28 DISALLOW_COPY_AND_ASSIGN(DeviceManagerFactory); | |
| 29 }; | |
| 30 | |
| 31 } // namespace usb | |
| 32 } // namespace device | |
| 33 | |
| 34 #endif // DEVICE_USB_PUBLIC_CPP_DEVICE_MANAGER_FACTORY_H_ | |
| OLD | NEW |