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

Side by Side Diff: content/renderer/media/user_media_client_impl.cc

Issue 1741553003: Fix for chromeRenderToAssociatedSink optional constraint calculation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // if it isNull. 172 // if it isNull.
173 if (user_media_request.isNull()) { 173 if (user_media_request.isNull()) {
174 // We are in a test. 174 // We are in a test.
175 controls.audio.requested = true; 175 controls.audio.requested = true;
176 controls.video.requested = true; 176 controls.video.requested = true;
177 } else { 177 } else {
178 if (user_media_request.audio()) { 178 if (user_media_request.audio()) {
179 controls.audio.requested = true; 179 controls.audio.requested = true;
180 // Check if this input device should be used to select a matching output 180 // Check if this input device should be used to select a matching output
181 // device for audio rendering. 181 // device for audio rendering.
182 if (!user_media_request.audioConstraints() 182 enable_automatic_output_device_selection = true; // On by default.
183 .basic() 183 for (auto advanced_constraint :
tommi (sloooow) - chröme 2016/02/26 13:12:56 const auto&
o1ka 2016/02/26 13:21:06 Done.
184 .renderToAssociatedSink.matches(false)) { 184 user_media_request.audioConstraints().advanced()) {
185 enable_automatic_output_device_selection = true; 185 if (advanced_constraint.renderToAssociatedSink.hasExact()) {
186 enable_automatic_output_device_selection =
187 advanced_constraint.renderToAssociatedSink.exact();
188 break;
189 }
186 } 190 }
187 } 191 }
188 if (user_media_request.video()) { 192 if (user_media_request.video()) {
189 controls.video.requested = true; 193 controls.video.requested = true;
190 } 194 }
191 CopyBlinkRequestToStreamControls(user_media_request, &controls); 195 CopyBlinkRequestToStreamControls(user_media_request, &controls);
192 196
193 security_origin = 197 security_origin =
194 blink::WebStringToGURL(user_media_request.securityOrigin().toString()); 198 blink::WebStringToGURL(user_media_request.securityOrigin().toString());
195 DCHECK(render_frame()->GetWebFrame() == 199 DCHECK(render_frame()->GetWebFrame() ==
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 return; 1137 return;
1134 } 1138 }
1135 } 1139 }
1136 } 1140 }
1137 1141
1138 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { 1142 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const {
1139 return !sources_waiting_for_callback_.empty(); 1143 return !sources_waiting_for_callback_.empty();
1140 } 1144 }
1141 1145
1142 } // namespace content 1146 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698