OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <list> | 7 #include <list> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 if (it != requests_.end()) { | 348 if (it != requests_.end()) { |
349 it->second.requester->StreamGenerationFailed(label); | 349 it->second.requester->StreamGenerationFailed(label); |
350 requests_.erase(it); | 350 requests_.erase(it); |
351 return; | 351 return; |
352 } | 352 } |
353 } | 353 } |
354 | 354 |
355 void MediaStreamManager::UseFakeDevice() { | 355 void MediaStreamManager::UseFakeDevice() { |
356 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 356 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
357 video_capture_manager_->UseFakeDevice(); | 357 video_capture_manager_->UseFakeDevice(); |
| 358 device_settings_->UseFakeUI(); |
358 // TODO(mflodman) Add audio manager when available. | 359 // TODO(mflodman) Add audio manager when available. |
359 } | 360 } |
360 | 361 |
361 bool MediaStreamManager::RequestDone(const DeviceRequest& request) const { | 362 bool MediaStreamManager::RequestDone(const DeviceRequest& request) const { |
362 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 363 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
363 // Check if all devices are opened. | 364 // Check if all devices are opened. |
364 if (Requested(request.options, kAudioCapture)) { | 365 if (Requested(request.options, kAudioCapture)) { |
365 for (StreamDeviceInfoArray::const_iterator it = | 366 for (StreamDeviceInfoArray::const_iterator it = |
366 request.audio_devices.begin(); it != request.audio_devices.end(); | 367 request.audio_devices.begin(); it != request.audio_devices.end(); |
367 ++it) { | 368 ++it) { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 MediaStreamRequester* requester, const StreamOptions& request_options) | 418 MediaStreamRequester* requester, const StreamOptions& request_options) |
418 : requester(requester), | 419 : requester(requester), |
419 options(request_options), | 420 options(request_options), |
420 state(kNumMediaStreamTypes, kNotRequested) { | 421 state(kNumMediaStreamTypes, kNotRequested) { |
421 DCHECK(requester); | 422 DCHECK(requester); |
422 } | 423 } |
423 | 424 |
424 MediaStreamManager::DeviceRequest::~DeviceRequest() {} | 425 MediaStreamManager::DeviceRequest::~DeviceRequest() {} |
425 | 426 |
426 } // namespace media_stream | 427 } // namespace media_stream |
OLD | NEW |