| 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/renderer/media/user_media_client_impl.h" | 5 #include "content/renderer/media/user_media_client_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 // if it isNull. | 212 // if it isNull. |
| 213 if (user_media_request.isNull()) { | 213 if (user_media_request.isNull()) { |
| 214 // We are in a test. | 214 // We are in a test. |
| 215 controls.audio.requested = true; | 215 controls.audio.requested = true; |
| 216 controls.video.requested = true; | 216 controls.video.requested = true; |
| 217 } else { | 217 } else { |
| 218 if (user_media_request.audio()) { | 218 if (user_media_request.audio()) { |
| 219 controls.audio.requested = true; | 219 controls.audio.requested = true; |
| 220 // Check if this input device should be used to select a matching output | 220 // Check if this input device should be used to select a matching output |
| 221 // device for audio rendering. | 221 // device for audio rendering. |
| 222 enable_automatic_output_device_selection = true; // On by default. | |
| 223 GetConstraintValueAsBoolean( | 222 GetConstraintValueAsBoolean( |
| 224 user_media_request.audioConstraints(), | 223 user_media_request.audioConstraints(), |
| 225 &blink::WebMediaTrackConstraintSet::renderToAssociatedSink, | 224 &blink::WebMediaTrackConstraintSet::renderToAssociatedSink, |
| 226 &enable_automatic_output_device_selection); | 225 &enable_automatic_output_device_selection); |
| 227 } | 226 } |
| 228 if (user_media_request.video()) { | 227 if (user_media_request.video()) { |
| 229 controls.video.requested = true; | 228 controls.video.requested = true; |
| 230 } | 229 } |
| 231 CopyBlinkRequestToStreamControls(user_media_request, &controls); | 230 CopyBlinkRequestToStreamControls(user_media_request, &controls); |
| 232 security_origin = user_media_request.getSecurityOrigin(); | 231 security_origin = user_media_request.getSecurityOrigin(); |
| (...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1171 return; | 1170 return; |
| 1172 } | 1171 } |
| 1173 } | 1172 } |
| 1174 } | 1173 } |
| 1175 | 1174 |
| 1176 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { | 1175 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { |
| 1177 return !sources_waiting_for_callback_.empty(); | 1176 return !sources_waiting_for_callback_.empty(); |
| 1178 } | 1177 } |
| 1179 | 1178 |
| 1180 } // namespace content | 1179 } // namespace content |
| OLD | NEW |