OLD | NEW |
---|---|
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 | 12 |
13 void EnsureMonitorCaptureDevices() { | 13 void EnsureMonitorCaptureDevices() { |
14 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 14 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
15 | |
15 // Post a EnumerateDevices() API to MSM to start the monitoring. | 16 // Post a EnumerateDevices() API to MSM to start the monitoring. |
16 BrowserMainLoop::GetMediaStreamManager()->EnumerateDevices( | 17 MediaStreamRequester* requester = NULL; |
17 NULL, -1, -1, MEDIA_DEVICE_AUDIO_CAPTURE, GURL()); | 18 BrowserThread::PostTask( |
19 BrowserThread::IO, | |
20 FROM_HERE, | |
21 base::Bind(base::IgnoreResult(&MediaStreamManager::EnumerateDevices), | |
scherkus (not reviewing)
2013/06/21 16:18:42
oh gross :(
yeah ... let's go back to the old met
| |
22 base::Unretained( | |
23 BrowserMainLoop::GetInstance()->media_stream_manager()), | |
24 requester, -1, -1, MEDIA_DEVICE_AUDIO_CAPTURE, GURL())); | |
18 } | 25 } |
19 | 26 |
20 } // namespace content | 27 } // namespace content |
OLD | NEW |