Index: base/system_monitor/system_monitor.h |
diff --git a/base/system_monitor/system_monitor.h b/base/system_monitor/system_monitor.h |
index 7684523616e0bd787e3a30f5ded9c40e1f7b5371..d381268a8415497ed770f86ac9209ab98dbbd3f8 100644 |
--- a/base/system_monitor/system_monitor.h |
+++ b/base/system_monitor/system_monitor.h |
@@ -8,6 +8,7 @@ |
#include "base/base_export.h" |
#include "base/basictypes.h" |
+#include "base/file_path.h" |
tpayne
2012/02/08 16:20:30
I thought forward declarations are preferred over
vandebo (ex-Chrome)
2012/02/08 18:37:01
Right, but the bind code, which is used by the obs
|
#include "build/build_config.h" |
// Windows HiRes timers drain the battery faster so we need to know the battery |
@@ -95,6 +96,14 @@ class BASE_EXPORT SystemMonitor { |
// Notification that the devices connected to the system have changed. |
virtual void OnDevicesChanged() {} |
+ // When a media device is attached or detached, we also fire one of these |
+ // two events. |
+ // TODO(vandebo) Pass an appropriate device identifier instead of FilePath. |
+ virtual void OnMediaDeviceAttached(const std::string& name, |
+ const FilePath& path) {} |
+ |
+ virtual void OnMediaDeviceDetached(const std::string& name) {} |
+ |
protected: |
virtual ~DevicesChangedObserver() {} |
}; |
@@ -123,6 +132,9 @@ class BASE_EXPORT SystemMonitor { |
// Cross-platform handling of a device change event. |
void ProcessDevicesChanged(); |
+ void ProcessMediaDeviceAttached(const std::string& name, |
+ const FilePath& path); |
+ void ProcessMediaDeviceDetached(const std::string& name); |
private: |
#if defined(OS_MACOSX) |
@@ -141,6 +153,8 @@ class BASE_EXPORT SystemMonitor { |
// Functions to trigger notifications. |
void NotifyDevicesChanged(); |
+ void NotifyMediaDeviceAttached(const std::string& name, const FilePath& path); |
+ void NotifyMediaDeviceDetached(const std::string& name); |
void NotifyPowerStateChange(); |
void NotifySuspend(); |
void NotifyResume(); |