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

Side by Side Diff: content/browser/renderer_host/media/media_stream_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 unified diff | Download patch
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 #include "content/browser/renderer_host/media/media_stream_manager.h" 5 #include "content/browser/renderer_host/media/media_stream_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h> 9 #include <string.h>
10 #include <algorithm> 10 #include <algorithm>
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 } 758 }
759 759
760 void MediaStreamManager::AudioOutputDevicesEnumerated( 760 void MediaStreamManager::AudioOutputDevicesEnumerated(
761 const AudioOutputDeviceEnumeration& device_enumeration) { 761 const AudioOutputDeviceEnumeration& device_enumeration) {
762 DCHECK_CURRENTLY_ON(BrowserThread::IO); 762 DCHECK_CURRENTLY_ON(BrowserThread::IO);
763 DVLOG(1) << "AudioOutputDevicesEnumerated()"; 763 DVLOG(1) << "AudioOutputDevicesEnumerated()";
764 StreamDeviceInfoArray device_infos; 764 StreamDeviceInfoArray device_infos;
765 765
766 if (device_enumeration.has_actual_devices) { 766 if (device_enumeration.has_actual_devices) {
767 for (const auto& entry : device_enumeration.devices) { 767 for (const auto& entry : device_enumeration.devices) {
768 StreamDeviceInfo device_info(MEDIA_DEVICE_AUDIO_OUTPUT, entry.device_name, 768 device_infos.emplace_back(MEDIA_DEVICE_AUDIO_OUTPUT, entry.device_name,
769 entry.unique_id); 769 entry.unique_id, entry.group_id);
770 device_info.device.group_id = entry.group_id;
771 device_infos.push_back(device_info);
772 } 770 }
773 } 771 }
774 772
775 const std::string log_message = 773 const std::string log_message =
776 "New device enumeration result:\n" + 774 "New device enumeration result:\n" +
777 GetLogMessageString(MEDIA_DEVICE_AUDIO_OUTPUT, device_infos); 775 GetLogMessageString(MEDIA_DEVICE_AUDIO_OUTPUT, device_infos);
778 SendMessageToNativeLog(log_message); 776 SendMessageToNativeLog(log_message);
779 777
780 // Publish the result for all requests waiting for device list(s). 778 // Publish the result for all requests waiting for device list(s).
781 for (const LabeledDeviceRequest& request : requests_) { 779 for (const LabeledDeviceRequest& request : requests_) {
(...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after
2185 if (device_info.session_id == session_id && 2183 if (device_info.session_id == session_id &&
2186 device_info.device.type == type) { 2184 device_info.device.type == type) {
2187 request->SetCapturingLinkSecured(is_secure); 2185 request->SetCapturingLinkSecured(is_secure);
2188 return; 2186 return;
2189 } 2187 }
2190 } 2188 }
2191 } 2189 }
2192 } 2190 }
2193 2191
2194 } // namespace content 2192 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698