1 // Copyright 2014 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.
5 #ifndef DEVICE_CORE_DEVICE_MONITOR_WIN_H_
6 #define DEVICE_CORE_DEVICE_MONITOR_WIN_H_
10 #include "base/observer_list.h"
14 // Use an instance of this class to observe devices being added and removed
15 // from the system, matched by device interface GUID.
16 class DeviceMonitorWin
{
20 virtual void OnDeviceAdded(const std::string
& device_path
);
21 virtual void OnDeviceRemoved(const std::string
& device_path
);
26 static DeviceMonitorWin
* GetForDeviceInterface(const GUID
& guid
);
28 void AddObserver(Observer
* observer
);
29 void RemoveObserver(Observer
* observer
);
32 friend class DeviceMonitorMessageWindow
;
34 DeviceMonitorWin(HDEVNOTIFY notify_handle
);
36 void NotifyDeviceAdded(const std::string
& device_path
);
37 void NotifyDeviceRemoved(const std::string
& device_path
);
39 ObserverList
<Observer
> observer_list_
;
40 HDEVNOTIFY notify_handle_
;
44 #endif // DEVICE_CORE_DEVICE_MONITOR_WIN_H_