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

Unified Diff: content/browser/renderer_host/media/audio_input_device_manager.cc

Issue 2323913007: Add constructor taking group ID to MediaStreamDevice and StreamDeviceInfo (Closed)
Patch Set: Fix constructor 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/media/audio_input_device_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/audio_input_device_manager.cc
diff --git a/content/browser/renderer_host/media/audio_input_device_manager.cc b/content/browser/renderer_host/media/audio_input_device_manager.cc
index 6a6047c3607c7d69e961253e80be765b5418c81e..43e17d5be95927ea788868b0b143ea9e46e5cf62 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager.cc
+++ b/content/browser/renderer_host/media/audio_input_device_manager.cc
@@ -177,12 +177,8 @@ void AudioInputDeviceManager::EnumerateOnDeviceThread(
for (media::AudioDeviceNames::iterator it = device_names.begin();
it != device_names.end(); ++it) {
// Add device information to device vector.
- devices->push_back(StreamDeviceInfo(
- stream_type, it->device_name, it->unique_id));
- }
- for (StreamDeviceInfo& device_info : *devices) {
- device_info.device.group_id =
- audio_manager_->GetGroupIDInput(device_info.device.id);
+ devices->emplace_back(stream_type, it->device_name, it->unique_id,
+ audio_manager_->GetGroupIDInput(it->unique_id));
}
// Return the device list through the listener by posting a task on
@@ -201,7 +197,7 @@ void AudioInputDeviceManager::OpenOnDeviceThread(
DCHECK(IsOnDeviceThread());
StreamDeviceInfo out(info.device.type, info.device.name, info.device.id,
- 0, 0, 0);
+ info.device.group_id, 0, 0, 0);
out.session_id = session_id;
MediaStreamDevice::AudioDeviceParameters& input_params = out.device.input;
« no previous file with comments | « no previous file | content/browser/renderer_host/media/audio_input_device_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698