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

Unified Diff: base/system_monitor/system_monitor.h

Issue 10836004: add device type as an argument in OnDevicesChanged. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix indent Created 8 years, 5 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 148913)
+++ base/system_monitor/system_monitor.h (working copy)
@@ -51,6 +51,13 @@
RESUME_EVENT // The system is being resumed.
};
+ // Type of devices whose change need to be monitored, such as add/remove.
+ enum DeviceType {
+ DEVTYPE_AUDIO_CAPTURE, // Audio capture device, e.g., microphone.
+ DEVTYPE_VIDEO_CAPTURE, // Video capture device, e.g., webcam.
+ DEVTYPE_UNKNOWN, // Other devices.
+ };
+
// Type of location data to identify a currently attached media device.
enum MediaDeviceType {
TYPE_PATH, // FilePath::StringType, e.g. a mount point.
@@ -140,7 +147,7 @@
public:
// Notification that the devices connected to the system have changed.
// This is only implemented on Windows currently.
- virtual void OnDevicesChanged() {}
+ virtual void OnDevicesChanged(DeviceType device_type) {}
// When a media device is attached or detached, one of these two events
// is triggered.
@@ -178,7 +185,7 @@
void ProcessPowerMessage(PowerEvent event_id);
// Cross-platform handling of a device change event.
- void ProcessDevicesChanged();
+ void ProcessDevicesChanged(DeviceType device_type);
void ProcessMediaDeviceAttached(const std::string& id,
const string16& name,
MediaDeviceType type,
@@ -204,7 +211,7 @@
void BatteryCheck();
// Functions to trigger notifications.
- void NotifyDevicesChanged();
+ void NotifyDevicesChanged(DeviceType device_type);
void NotifyMediaDeviceAttached(const std::string& id,
const string16& name,
MediaDeviceType type,
« 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