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

Unified Diff: chrome/browser/media/media_stream_devices_controller.cc

Issue 12153002: Move chrome://media-internals to content. This allows us to hide implementation details from the pu… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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: chrome/browser/media/media_stream_devices_controller.cc
===================================================================
--- chrome/browser/media/media_stream_devices_controller.cc (revision 179909)
+++ chrome/browser/media/media_stream_devices_controller.cc (working copy)
@@ -11,7 +11,6 @@
#include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h"
#include "chrome/browser/extensions/api/tab_capture/tab_capture_registry_factory.h"
#include "chrome/browser/media/media_capture_devices_dispatcher.h"
-#include "chrome/browser/media/media_internals.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
@@ -25,12 +24,10 @@
namespace {
bool HasAnyAvailableDevice() {
- MediaCaptureDevicesDispatcher* dispatcher =
- MediaInternals::GetInstance()->GetMediaCaptureDevicesDispatcher();
const content::MediaStreamDevices& audio_devices =
- dispatcher->GetAudioCaptureDevices();
+ MediaCaptureDevicesDispatcher::GetInstance()->GetAudioCaptureDevices();
const content::MediaStreamDevices& video_devices =
- dispatcher->GetVideoCaptureDevices();
+ MediaCaptureDevicesDispatcher::GetInstance()->GetVideoCaptureDevices();
return !audio_devices.empty() || !video_devices.empty();
};
@@ -129,19 +126,21 @@
case content::MEDIA_OPEN_DEVICE:
// For open device request pick the desired device or fall back to the
// first available of the given type.
- media::GetRequestedDevice(request_.requested_device_id,
- has_audio_,
- has_video_,
- &devices);
+ MediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
+ request_.requested_device_id,
+ has_audio_,
+ has_video_,
+ &devices);
break;
case content::MEDIA_DEVICE_ACCESS:
case content::MEDIA_GENERATE_STREAM:
case content::MEDIA_ENUMERATE_DEVICES:
// Get the default devices for the request.
- media::GetDefaultDevicesForProfile(profile_,
- has_audio_,
- has_video_,
- &devices);
+ MediaCaptureDevicesDispatcher::GetInstance()->
+ GetDefaultDevicesForProfile(profile_,
+ has_audio_,
+ has_video_,
+ &devices);
break;
}

Powered by Google App Engine
This is Rietveld 408576698