Chromium Code Reviews| Index: base/system_monitor/system_monitor.h |
| =================================================================== |
| --- base/system_monitor/system_monitor.h (revision 137731) |
| +++ base/system_monitor/system_monitor.h (working copy) |
| @@ -6,7 +6,10 @@ |
| #define BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_ |
| #pragma once |
| +#include <map> |
| #include <string> |
| +#include <utility> |
| +#include <vector> |
| #include "base/base_export.h" |
| #include "base/basictypes.h" |
| @@ -47,6 +50,8 @@ |
| }; |
| typedef unsigned int DeviceIdType; |
| + // (Media device name, Media device path) |
| + typedef std::pair<std::string, FilePath> MediaDeviceInfo; |
|
vandebo (ex-Chrome)
2012/05/17 23:49:17
Seems that this should now include id, so that we
Lei Zhang
2012/05/18 00:07:27
Done.
I had it earlier, but I never used the id s
|
| // Create SystemMonitor. Only one SystemMonitor instance per application |
| // is allowed. |
| @@ -145,7 +150,12 @@ |
| const FilePath& path); |
| void ProcessMediaDeviceDetached(const DeviceIdType& id); |
| + // Appends info for attached media devices to |results|. |
| + void GetMediaDevices(std::vector<MediaDeviceInfo>* results); |
|
vandebo (ex-Chrome)
2012/05/17 23:49:17
GetAttachedMediaDevices ?
Lei Zhang
2012/05/18 00:07:27
Done.
|
| + |
| private: |
| + typedef std::map<base::SystemMonitor::DeviceIdType, |
|
vandebo (ex-Chrome)
2012/05/17 23:49:17
Is this typedef worthwhile? It's only used three
Lei Zhang
2012/05/18 00:07:27
Yes, because I'd prefer not to write "std::map<bas
|
| + MediaDeviceInfo> MediaDeviceMap; |
| #if defined(OS_MACOSX) |
| void PlatformInit(); |
| void PlatformDestroy(); |
| @@ -180,6 +190,8 @@ |
| base::OneShotTimer<SystemMonitor> delayed_battery_check_; |
| #endif |
| + MediaDeviceMap media_device_map_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(SystemMonitor); |
| }; |