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

Unified Diff: device/usb/device_manager_impl.h

Issue 1176383002: Revert of Introduce the devices Mojo app (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/usb/BUILD.gn ('k') | device/usb/device_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/device_manager_impl.h
diff --git a/device/usb/device_manager_impl.h b/device/usb/device_manager_impl.h
index 7be09ff59d0cc22dd5bcb24547642c94d2d4185b..5c77a65b39d09cbda941a36066528ca2570fd5e0 100644
--- a/device/usb/device_manager_impl.h
+++ b/device/usb/device_manager_impl.h
@@ -15,14 +15,6 @@
#include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
#include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
-namespace base {
-class SequencedTaskRunner;
-}
-
-namespace mojo {
-class ErrorHandler;
-}
-
namespace device {
class UsbDevice;
@@ -33,17 +25,13 @@
class DeviceManagerDelegate;
-// Implementation of the public DeviceManager interface. This interface can be
-// requested from the devices app located at "system:devices", if available.
+// Implementation of the public DeviceManager interface. Clients in the browser
+// can connect to this service via DeviceClient::ConnectToUSBDeviceManager.
class DeviceManagerImpl : public DeviceManager {
public:
- DeviceManagerImpl(
- mojo::InterfaceRequest<DeviceManager> request,
- scoped_ptr<DeviceManagerDelegate> delegate,
- scoped_refptr<base::SequencedTaskRunner> service_task_runner);
+ DeviceManagerImpl(mojo::InterfaceRequest<DeviceManager> request,
+ scoped_ptr<DeviceManagerDelegate> delegate);
~DeviceManagerImpl() override;
-
- void set_error_handler(mojo::ErrorHandler* error_handler);
private:
// DeviceManager implementation:
@@ -54,14 +42,18 @@
const OpenDeviceCallback& callback) override;
// Callback to handle the async response from the underlying UsbService.
- void OnGetDevices(EnumerationOptionsPtr options,
- const GetDevicesCallback& callback,
+ void OnGetDevices(const GetDevicesCallback& callback,
+ const std::vector<UsbDeviceFilter>& filters,
const std::vector<scoped_refptr<UsbDevice>>& devices);
+
+ // Callback to handle the async Open response from a UsbDevice.
+ void OnOpenDevice(const OpenDeviceCallback& callback,
+ mojo::InterfaceRequest<Device> device_request,
+ scoped_refptr<UsbDeviceHandle> device_handle);
mojo::StrongBinding<DeviceManager> binding_;
scoped_ptr<DeviceManagerDelegate> delegate_;
- scoped_refptr<base::SequencedTaskRunner> service_task_runner_;
base::WeakPtrFactory<DeviceManagerImpl> weak_factory_;
« no previous file with comments | « device/usb/BUILD.gn ('k') | device/usb/device_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698