Respond with QuotaExceededError when IndexedDB has no disk space on open.
[chromium-blink-merge.git] / content / browser / media_devices_monitor.cc
blob72c3b4b1cefcc1b7c9a4180d63abe780212cde5d
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
3 // found in the LICENSE file.
5 #include "content/public/browser/media_devices_monitor.h"
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"
11 namespace content {
12 namespace {
13 void EnsureMonitorCaptureDevicesInternal(
14 MediaStreamManager* media_stream_manager) {
15 media_stream_manager->EnumerateDevices(
16 NULL, -1, -1, -1, MEDIA_DEVICE_AUDIO_CAPTURE, GURL());
20 void EnsureMonitorCaptureDevices() {
21 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
23 BrowserThread::PostTask(
24 BrowserThread::IO, FROM_HERE,
25 base::Bind(&EnsureMonitorCaptureDevicesInternal,
26 BrowserMainLoop::GetInstance()->media_stream_manager()));
29 } // namespace content