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

Unified Diff: content/browser/media_devices_monitor.cc

Issue 17508005: Minor cleanup to remove the static thread-safe methods on BrowserMainLoop. Initially I thought this… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/media_devices_monitor.cc
===================================================================
--- content/browser/media_devices_monitor.cc (revision 207505)
+++ content/browser/media_devices_monitor.cc (working copy)
@@ -9,12 +9,22 @@
#include "content/public/browser/browser_thread.h"
namespace content {
-
-void EnsureMonitorCaptureDevices() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+namespace {
+void EnsureMonitorCaptureDevicesInternal(
+ MediaStreamManager* media_stream_manager) {
// Post a EnumerateDevices() API to MSM to start the monitoring.
scherkus (not reviewing) 2013/06/21 00:42:43 comment is incorrect
jam 2013/06/21 15:38:58 that's what it was before?
scherkus (not reviewing) 2013/06/21 16:18:42 oh I was referring to the "post to start" -- that
jam 2013/06/21 16:49:19 what I meant was that that comment was there befor
- BrowserMainLoop::GetMediaStreamManager()->EnumerateDevices(
+ media_stream_manager->EnumerateDevices(
NULL, -1, -1, MEDIA_DEVICE_AUDIO_CAPTURE, GURL());
}
+}
+void EnsureMonitorCaptureDevices() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ base::Bind(&EnsureMonitorCaptureDevicesInternal,
scherkus (not reviewing) 2013/06/21 00:42:43 I guess we could replace EnsureMonitorCaptureDevic
jam 2013/06/21 15:38:58 Done. it ended up looking not so pretty though bec
+ BrowserMainLoop::GetInstance()->media_stream_manager()));
+}
+
} // namespace content
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/renderer_host/media/audio_input_renderer_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698