Home | History | Annotate | Download | only in media
      1 // Copyright 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include "content/public/browser/media_devices_monitor.h"
      6 
      7 #include "content/browser/browser_main_loop.h"
      8 #include "content/browser/renderer_host/media/media_stream_manager.h"
      9 #include "content/public/browser/browser_thread.h"
     10 
     11 namespace content {
     12 namespace {
     13 void EnsureMonitorCaptureDevicesInternal(
     14     MediaStreamManager* media_stream_manager) {
     15   media_stream_manager->EnsureDeviceMonitorStarted();
     16 }
     17 }
     18 
     19 void EnsureMonitorCaptureDevices() {
     20   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
     21 
     22   BrowserThread::PostTask(
     23       BrowserThread::IO, FROM_HERE,
     24       base::Bind(&EnsureMonitorCaptureDevicesInternal,
     25                  BrowserMainLoop::GetInstance()->media_stream_manager()));
     26 }
     27 
     28 }  // namespace content
     29