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

Side by Side Diff: base/system_monitor/system_monitor.h

Issue 2326623003: Make SystemMonitor report all audio device changes instead of just audio capture. (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_ 5 #ifndef BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_
6 #define BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_ 6 #define BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/observer_list_threadsafe.h" 11 #include "base/observer_list_threadsafe.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 13
14 namespace base { 14 namespace base {
15 15
16 // Class for monitoring various system-related subsystems 16 // Class for monitoring various system-related subsystems
17 // such as power management, network status, etc. 17 // such as power management, network status, etc.
18 // TODO(mbelshe): Add support beyond just power management. 18 // TODO(mbelshe): Add support beyond just power management.
19 class BASE_EXPORT SystemMonitor { 19 class BASE_EXPORT SystemMonitor {
20 public: 20 public:
21 // Type of devices whose change need to be monitored, such as add/remove. 21 // Type of devices whose change need to be monitored, such as add/remove.
22 enum DeviceType { 22 enum DeviceType {
23 DEVTYPE_AUDIO_CAPTURE, // Audio capture device, e.g., microphone. 23 DEVTYPE_AUDIO, // Audio device, e.g., microphone.
24 DEVTYPE_VIDEO_CAPTURE, // Video capture device, e.g., webcam. 24 DEVTYPE_VIDEO_CAPTURE, // Video capture device, e.g., webcam.
25 DEVTYPE_UNKNOWN, // Other devices. 25 DEVTYPE_UNKNOWN, // Other devices.
26 }; 26 };
27 27
28 // Create SystemMonitor. Only one SystemMonitor instance per application 28 // Create SystemMonitor. Only one SystemMonitor instance per application
29 // is allowed. 29 // is allowed.
30 SystemMonitor(); 30 SystemMonitor();
31 ~SystemMonitor(); 31 ~SystemMonitor();
32 32
33 // Get the application-wide SystemMonitor (if not present, returns NULL). 33 // Get the application-wide SystemMonitor (if not present, returns NULL).
34 static SystemMonitor* Get(); 34 static SystemMonitor* Get();
35 35
(...skipping 30 matching lines...) Expand all
66 66
67 scoped_refptr<ObserverListThreadSafe<DevicesChangedObserver> > 67 scoped_refptr<ObserverListThreadSafe<DevicesChangedObserver> >
68 devices_changed_observer_list_; 68 devices_changed_observer_list_;
69 69
70 DISALLOW_COPY_AND_ASSIGN(SystemMonitor); 70 DISALLOW_COPY_AND_ASSIGN(SystemMonitor);
71 }; 71 };
72 72
73 } // namespace base 73 } // namespace base
74 74
75 #endif // BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_ 75 #endif // BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698