Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2222)

Unified Diff: base/system_monitor/system_monitor.h

Issue 10332190: Add SystemMonitor::GetMediaDevices() (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/system_monitor/system_monitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/system_monitor/system_monitor.h
===================================================================
--- base/system_monitor/system_monitor.h (revision 138120)
+++ base/system_monitor/system_monitor.h (working copy)
@@ -9,10 +9,12 @@
#include <map>
#include <string>
#include <utility>
+#include <vector>
#include "base/base_export.h"
#include "base/basictypes.h"
#include "base/threading/thread_checker.h"
+#include "base/tuple.h"
#include "build/build_config.h"
// Windows HiRes timers drain the battery faster so we need to know the battery
@@ -57,6 +59,8 @@
};
typedef unsigned int DeviceIdType;
+ // (Media device id, Media device name, Media device path)
+ typedef Tuple3<DeviceIdType, std::string, FilePath> MediaDeviceInfo;
// Create SystemMonitor. Only one SystemMonitor instance per application
// is allowed.
@@ -155,6 +159,9 @@
const FilePath& path);
void ProcessMediaDeviceDetached(const DeviceIdType& id);
+ // Returns information for attached media devices.
+ std::vector<MediaDeviceInfo>* GetAttachedMediaDevices() const;
+
// Enters or leaves a period of time with a given |requirement|. If the
// operation has multiple requirements, make sure to use a unique |reason| for
// each one. Reusing the same |reason| is OK as far as the |requirement| is
@@ -172,6 +179,8 @@
size_t GetPowerRequirementsCountForTest() const;
private:
+ typedef std::map<base::SystemMonitor::DeviceIdType,
+ MediaDeviceInfo> MediaDeviceMap;
#if defined(OS_MACOSX)
void PlatformInit();
void PlatformDestroy();
@@ -211,6 +220,8 @@
base::OneShotTimer<SystemMonitor> delayed_battery_check_;
#endif
+ MediaDeviceMap media_device_map_;
+
DISALLOW_COPY_AND_ASSIGN(SystemMonitor);
};
« no previous file with comments | « no previous file | base/system_monitor/system_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698