summaryrefslogtreecommitdiffstats
path: root/device/hid/hid_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'device/hid/hid_service.h')
-rw-r--r--device/hid/hid_service.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/device/hid/hid_service.h b/device/hid/hid_service.h
index 6d6ef2b..4a4d3ad 100644
--- a/device/hid/hid_service.h
+++ b/device/hid/hid_service.h
@@ -27,7 +27,15 @@ class HidService {
class Observer {
public:
virtual void OnDeviceAdded(scoped_refptr<HidDeviceInfo> info);
+ // Notifies all observers that a device is being removed, called before
+ // removing the device from HidService. Observers should not depend on the
+ // order in which they are notified of the OnDeviceRemove event.
virtual void OnDeviceRemoved(scoped_refptr<HidDeviceInfo> info);
+ // Notifies all observers again, after having first notified all observers
+ // with OnDeviceRemoved and removed the device from internal structures.
+ // Each observer must not depend on any other observers' awareness of the
+ // device as they could be cleaned up in any order.
+ virtual void OnDeviceRemovedCleanup(scoped_refptr<HidDeviceInfo> info);
};
typedef base::Callback<void(const std::vector<scoped_refptr<HidDeviceInfo>>&)>