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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
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 {
13 void EnsureMonitorCaptureDevicesInternal(
14 MediaStreamManager* media_stream_manager) {
15 // 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
16 media_stream_manager->EnumerateDevices(
17 NULL, -1, -1, MEDIA_DEVICE_AUDIO_CAPTURE, GURL());
18 }
19 }
12 20
13 void EnsureMonitorCaptureDevices() { 21 void EnsureMonitorCaptureDevices() {
14 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 22 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
15 // Post a EnumerateDevices() API to MSM to start the monitoring. 23
16 BrowserMainLoop::GetMediaStreamManager()->EnumerateDevices( 24 BrowserThread::PostTask(
17 NULL, -1, -1, MEDIA_DEVICE_AUDIO_CAPTURE, GURL()); 25 BrowserThread::IO, FROM_HERE,
26 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
27 BrowserMainLoop::GetInstance()->media_stream_manager()));
18 } 28 }
19 29
20 } // namespace content 30 } // namespace content
OLDNEW
« 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