Index: base/system_monitor/system_monitor.h |
=================================================================== |
--- base/system_monitor/system_monitor.h (revision 109978) |
+++ base/system_monitor/system_monitor.h (working copy) |
@@ -90,26 +90,15 @@ |
virtual ~PowerObserver() {} |
}; |
- class BASE_EXPORT DevicesChangedObserver { |
- public: |
- // Notification that the devices connected to the system have changed. |
- virtual void OnDevicesChanged() {} |
- |
- protected: |
- virtual ~DevicesChangedObserver() {} |
- }; |
- |
// Add a new observer. |
// Can be called from any thread. |
// Must not be called from within a notification callback. |
- void AddPowerObserver(PowerObserver* obs); |
- void AddDevicesChangedObserver(DevicesChangedObserver* obs); |
+ void AddObserver(PowerObserver* obs); |
// Remove an existing observer. |
// Can be called from any thread. |
// Must not be called from within a notification callback. |
- void RemovePowerObserver(PowerObserver* obs); |
- void RemoveDevicesChangedObserver(DevicesChangedObserver* obs); |
+ void RemoveObserver(PowerObserver* obs); |
#if defined(OS_WIN) |
// Windows-specific handling of a WM_POWERBROADCAST message. |
@@ -121,9 +110,6 @@ |
// Cross-platform handling of a power event. |
void ProcessPowerMessage(PowerEvent event_id); |
- // Cross-platform handling of a device change event. |
- void ProcessDevicesChanged(); |
- |
private: |
#if defined(OS_MACOSX) |
void PlatformInit(); |
@@ -140,14 +126,11 @@ |
void BatteryCheck(); |
// Functions to trigger notifications. |
- void NotifyDevicesChanged(); |
void NotifyPowerStateChange(); |
void NotifySuspend(); |
void NotifyResume(); |
- scoped_refptr<ObserverListThreadSafe<PowerObserver> > power_observer_list_; |
- scoped_refptr<ObserverListThreadSafe<DevicesChangedObserver> > |
- devices_changed_observer_list_; |
+ scoped_refptr<ObserverListThreadSafe<PowerObserver> > observer_list_; |
bool battery_in_use_; |
bool suspended_; |