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

Side by Side Diff: content/browser/renderer_host/media/media_stream_manager.cc

Issue 7314022: Adding possibility to bypass MediaStream UI to be able to rununit tests on server. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/renderer_host/media/media_stream_device_settings.cc ('k') | 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) 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
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
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
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/media_stream_device_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698