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

Side by Side Diff: content/browser/media/media_devices_monitor.cc

Issue 57913002: Refactor how the DeviceMonitor is started. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | « no previous file | content/browser/renderer_host/media/media_stream_manager.h » ('j') | 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/public/browser/media_devices_monitor.h" 5 #include "content/public/browser/media_devices_monitor.h"
6 6
7 #include "content/browser/browser_main_loop.h" 7 #include "content/browser/browser_main_loop.h"
8 #include "content/browser/renderer_host/media/media_stream_manager.h" 8 #include "content/browser/renderer_host/media/media_stream_manager.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 10
11 namespace content { 11 namespace content {
12 namespace { 12 namespace {
13 void EnsureMonitorCaptureDevicesInternal( 13 void EnsureMonitorCaptureDevicesInternal(
14 MediaStreamManager* media_stream_manager) { 14 MediaStreamManager* media_stream_manager) {
15 // TODO(perkj): The argument list suggests that this is the wrong design. Can 15 media_stream_manager->StartMonitoring();
no longer working on chromium 2013/11/04 15:51:22 This EnsureMonitorCaptureDevicesInternal is trigge
16 // we add a separate method for device monitoring?
17 media_stream_manager->EnumerateDevices(
18 NULL, -1, -1, NULL, -1, MEDIA_DEVICE_AUDIO_CAPTURE, GURL());
19 } 16 }
20 } 17 }
21 18
22 void EnsureMonitorCaptureDevices() { 19 void EnsureMonitorCaptureDevices() {
23 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 20 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
24 21
25 BrowserThread::PostTask( 22 BrowserThread::PostTask(
26 BrowserThread::IO, FROM_HERE, 23 BrowserThread::IO, FROM_HERE,
27 base::Bind(&EnsureMonitorCaptureDevicesInternal, 24 base::Bind(&EnsureMonitorCaptureDevicesInternal,
28 BrowserMainLoop::GetInstance()->media_stream_manager())); 25 BrowserMainLoop::GetInstance()->media_stream_manager()));
29 } 26 }
30 27
31 } // namespace content 28 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/media_stream_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698