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

Side by Side Diff: media/device_monitors/device_monitor_udev.cc

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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // libudev is used for monitoring device changes. 5 // libudev is used for monitoring device changes.
6 6
7 #include "media/device_monitors/device_monitor_udev.h" 7 #include "media/device_monitors/device_monitor_udev.h"
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 10 matching lines...) Expand all
21 base::SystemMonitor::DeviceType device_type; 21 base::SystemMonitor::DeviceType device_type;
22 const char* subsystem; 22 const char* subsystem;
23 const char* devtype; 23 const char* devtype;
24 }; 24 };
25 25
26 const char kAudioSubsystem[] = "sound"; 26 const char kAudioSubsystem[] = "sound";
27 const char kVideoSubsystem[] = "video4linux"; 27 const char kVideoSubsystem[] = "video4linux";
28 28
29 // Add more subsystems here for monitoring. 29 // Add more subsystems here for monitoring.
30 const SubsystemMap kSubsystemMap[] = { 30 const SubsystemMap kSubsystemMap[] = {
31 {base::SystemMonitor::DEVTYPE_AUDIO_CAPTURE, kAudioSubsystem, NULL}, 31 {base::SystemMonitor::DEVTYPE_AUDIO, kAudioSubsystem, NULL},
32 {base::SystemMonitor::DEVTYPE_VIDEO_CAPTURE, kVideoSubsystem, NULL}, 32 {base::SystemMonitor::DEVTYPE_VIDEO_CAPTURE, kVideoSubsystem, NULL},
33 }; 33 };
34 34
35 } // namespace 35 } // namespace
36 36
37 namespace media { 37 namespace media {
38 38
39 DeviceMonitorLinux::DeviceMonitorLinux( 39 DeviceMonitorLinux::DeviceMonitorLinux(
40 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) 40 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner)
41 : io_task_runner_(io_task_runner) { 41 : io_task_runner_(io_task_runner) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 device_type = entry.device_type; 79 device_type = entry.device_type;
80 break; 80 break;
81 } 81 }
82 } 82 }
83 DCHECK_NE(device_type, base::SystemMonitor::DEVTYPE_UNKNOWN); 83 DCHECK_NE(device_type, base::SystemMonitor::DEVTYPE_UNKNOWN);
84 84
85 base::SystemMonitor::Get()->ProcessDevicesChanged(device_type); 85 base::SystemMonitor::Get()->ProcessDevicesChanged(device_type);
86 } 86 }
87 87
88 } // namespace media 88 } // namespace media
OLDNEW
« no previous file with comments | « media/device_monitors/device_monitor_mac.mm ('k') | media/device_monitors/system_message_window_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698