| OLD | NEW |
| 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 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 } | 1033 } |
| 1034 | 1034 |
| 1035 void MediaStreamManager::TranslateDeviceIdToSourceId( | 1035 void MediaStreamManager::TranslateDeviceIdToSourceId( |
| 1036 DeviceRequest* request, | 1036 DeviceRequest* request, |
| 1037 MediaStreamDevice* device) { | 1037 MediaStreamDevice* device) { |
| 1038 if (request->audio_type() == MEDIA_DEVICE_AUDIO_CAPTURE || | 1038 if (request->audio_type() == MEDIA_DEVICE_AUDIO_CAPTURE || |
| 1039 request->audio_type() == MEDIA_DEVICE_AUDIO_OUTPUT || | 1039 request->audio_type() == MEDIA_DEVICE_AUDIO_OUTPUT || |
| 1040 request->video_type() == MEDIA_DEVICE_VIDEO_CAPTURE) { | 1040 request->video_type() == MEDIA_DEVICE_VIDEO_CAPTURE) { |
| 1041 device->id = GetHMACForMediaDeviceID(request->salt, | 1041 device->id = GetHMACForMediaDeviceID(request->salt, |
| 1042 request->security_origin, device->id); | 1042 request->security_origin, device->id); |
| 1043 if (!device->matched_output_device_id.empty()) { |
| 1044 device->matched_output_device_id = |
| 1045 GetHMACForMediaDeviceID(request->salt, request->security_origin, |
| 1046 device->matched_output_device_id); |
| 1047 } |
| 1043 } | 1048 } |
| 1044 } | 1049 } |
| 1045 | 1050 |
| 1046 void MediaStreamManager::ClearEnumerationCache(EnumerationCache* cache) { | 1051 void MediaStreamManager::ClearEnumerationCache(EnumerationCache* cache) { |
| 1047 DCHECK(CalledOnIOThread()); | 1052 DCHECK(CalledOnIOThread()); |
| 1048 cache->valid = false; | 1053 cache->valid = false; |
| 1049 } | 1054 } |
| 1050 | 1055 |
| 1051 bool MediaStreamManager::EnumerationRequired(EnumerationCache* cache, | 1056 bool MediaStreamManager::EnumerationRequired(EnumerationCache* cache, |
| 1052 MediaStreamType stream_type) { | 1057 MediaStreamType stream_type) { |
| (...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2181 if (device_info.session_id == session_id && | 2186 if (device_info.session_id == session_id && |
| 2182 device_info.device.type == type) { | 2187 device_info.device.type == type) { |
| 2183 request->SetCapturingLinkSecured(is_secure); | 2188 request->SetCapturingLinkSecured(is_secure); |
| 2184 return; | 2189 return; |
| 2185 } | 2190 } |
| 2186 } | 2191 } |
| 2187 } | 2192 } |
| 2188 } | 2193 } |
| 2189 | 2194 |
| 2190 } // namespace content | 2195 } // namespace content |
| OLD | NEW |