OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ui_proxy.h" | 5 #include "content/browser/renderer_host/media/media_stream_ui_proxy.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/browser/renderer_host/render_view_host_delegate.h" | 8 #include "content/browser/renderer_host/render_view_host_delegate.h" |
9 #include "content/browser/renderer_host/render_view_host_impl.h" | 9 #include "content/browser/renderer_host/render_view_host_impl.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 MediaStreamDevices devices_to_use; | 223 MediaStreamDevices devices_to_use; |
224 bool accepted_audio = false; | 224 bool accepted_audio = false; |
225 bool accepted_video = false; | 225 bool accepted_video = false; |
226 | 226 |
227 // Use the first capture device of the same media type in the list for the | 227 // Use the first capture device of the same media type in the list for the |
228 // fake UI. | 228 // fake UI. |
229 for (MediaStreamDevices::const_iterator it = devices_.begin(); | 229 for (MediaStreamDevices::const_iterator it = devices_.begin(); |
230 it != devices_.end(); ++it) { | 230 it != devices_.end(); ++it) { |
231 if (!accepted_audio && | 231 if (!accepted_audio && |
232 IsAudioMediaType(request.audio_type) && | 232 IsAudioInputMediaType(request.audio_type) && |
233 IsAudioMediaType(it->type) && | 233 IsAudioInputMediaType(it->type) && |
234 (request.requested_audio_device_id.empty() || | 234 (request.requested_audio_device_id.empty() || |
235 request.requested_audio_device_id == it->id)) { | 235 request.requested_audio_device_id == it->id)) { |
236 devices_to_use.push_back(*it); | 236 devices_to_use.push_back(*it); |
237 accepted_audio = true; | 237 accepted_audio = true; |
238 } else if (!accepted_video && | 238 } else if (!accepted_video && |
239 IsVideoMediaType(request.video_type) && | 239 IsVideoMediaType(request.video_type) && |
240 IsVideoMediaType(it->type) && | 240 IsVideoMediaType(it->type) && |
241 (request.requested_video_device_id.empty() || | 241 (request.requested_video_device_id.empty() || |
242 request.requested_video_device_id == it->id)) { | 242 request.requested_video_device_id == it->id)) { |
243 devices_to_use.push_back(*it); | 243 devices_to_use.push_back(*it); |
(...skipping 15 matching lines...) Expand all Loading... |
259 devices_to_use.empty() ? | 259 devices_to_use.empty() ? |
260 MEDIA_DEVICE_NO_HARDWARE : | 260 MEDIA_DEVICE_NO_HARDWARE : |
261 MEDIA_DEVICE_OK)); | 261 MEDIA_DEVICE_OK)); |
262 } | 262 } |
263 | 263 |
264 void FakeMediaStreamUIProxy::OnStarted( | 264 void FakeMediaStreamUIProxy::OnStarted( |
265 const base::Closure& stop_callback, | 265 const base::Closure& stop_callback, |
266 const WindowIdCallback& window_id_callback) {} | 266 const WindowIdCallback& window_id_callback) {} |
267 | 267 |
268 } // namespace content | 268 } // namespace content |
OLD | NEW |