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 GUID
& class_guid
,
21 const std::string
& device_path
);
22 virtual void OnDeviceRemoved(const GUID
& class_guid
,
23 const std::string
& device_path
);
28 static DeviceMonitorWin
* GetForDeviceInterface(const GUID
& guid
);
29 static DeviceMonitorWin
* GetForAllInterfaces();
31 void AddObserver(Observer
* observer
);
32 void RemoveObserver(Observer
* observer
);
35 friend class DeviceMonitorMessageWindow
;
39 void NotifyDeviceAdded(const GUID
& class_guid
,
40 const std::string
& device_path
);
41 void NotifyDeviceRemoved(const GUID
& class_guid
,
42 const std::string
& device_path
);
44 ObserverList
<Observer
> observer_list_
;
49 #endif // DEVICE_CORE_DEVICE_MONITOR_WIN_H_