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

Unified Diff: device/usb/mojo/device_manager_impl.h

Issue 1946063002: Replace DeviceManager::GetDeviceChanges with a client interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@proper_stubs
Patch Set: Rebase.d Created 4 years, 7 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 | « no previous file | device/usb/mojo/device_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/mojo/device_manager_impl.h
diff --git a/device/usb/mojo/device_manager_impl.h b/device/usb/mojo/device_manager_impl.h
index 2334bcddd8ca97f5ce82774e5ff4ecf0987f9c62..2bc524a3f215c23645d5e616a76fc806ea351c8f 100644
--- a/device/usb/mojo/device_manager_impl.h
+++ b/device/usb/mojo/device_manager_impl.h
@@ -53,9 +53,9 @@ class DeviceManagerImpl : public DeviceManager, public UsbService::Observer {
// DeviceManager implementation:
void GetDevices(EnumerationOptionsPtr options,
const GetDevicesCallback& callback) override;
- void GetDeviceChanges(const GetDeviceChangesCallback& callback) override;
void GetDevice(const mojo::String& guid,
mojo::InterfaceRequest<Device> device_request) override;
+ void SetClient(DeviceManagerClientPtr client) override;
// Callbacks to handle the async responses from the underlying UsbService.
void OnGetDevices(EnumerationOptionsPtr options,
@@ -71,16 +71,9 @@ class DeviceManagerImpl : public DeviceManager, public UsbService::Observer {
base::WeakPtr<PermissionProvider> permission_provider_;
- // If there are unfinished calls to GetDeviceChanges their callbacks
- // are stored in |device_change_callbacks_|. Otherwise device changes
- // are collected in |devices_added_| and |devices_removed_| until the
- // next call to GetDeviceChanges.
- std::queue<GetDeviceChangesCallback> device_change_callbacks_;
- std::map<std::string, DeviceInfoPtr> devices_added_;
- std::vector<DeviceInfoPtr> devices_removed_;
-
UsbService* usb_service_;
ScopedObserver<UsbService, UsbService::Observer> observer_;
+ DeviceManagerClientPtr client_;
mojo::Closure connection_error_handler_;
« no previous file with comments | « no previous file | device/usb/mojo/device_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698