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

Unified Diff: chrome/browser/ui/webui/options/media_devices_selection_handler.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/ui/webui/options/media_devices_selection_handler.cc
===================================================================
--- chrome/browser/ui/webui/options/media_devices_selection_handler.cc (revision 179909)
+++ chrome/browser/ui/webui/options/media_devices_selection_handler.cc (working copy)
@@ -5,7 +5,6 @@
#include "chrome/browser/ui/webui/options/media_devices_selection_handler.h"
#include "base/bind.h"
-#include "chrome/browser/media/media_internals.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
@@ -22,10 +21,7 @@
MediaDevicesSelectionHandler::MediaDevicesSelectionHandler() {}
MediaDevicesSelectionHandler::~MediaDevicesSelectionHandler() {
- // Register to the device observer list to get up-to-date device lists.
- MediaCaptureDevicesDispatcher* dispatcher =
- MediaInternals::GetInstance()->GetMediaCaptureDevicesDispatcher();
- dispatcher->RemoveObserver(this);
+ MediaCaptureDevicesDispatcher::GetInstance()->RemoveObserver(this);
}
void MediaDevicesSelectionHandler::GetLocalizedValues(DictionaryValue* values) {
@@ -41,9 +37,7 @@
void MediaDevicesSelectionHandler::InitializePage() {
// Register to the device observer list to get up-to-date device lists.
- MediaCaptureDevicesDispatcher* dispatcher =
- MediaInternals::GetInstance()->GetMediaCaptureDevicesDispatcher();
- dispatcher->AddObserver(this);
+ MediaCaptureDevicesDispatcher::GetInstance()->AddObserver(this);
// Update the device selection menus.
UpdateDevicesMenuForType(AUDIO);
@@ -132,15 +126,15 @@
}
void MediaDevicesSelectionHandler::UpdateDevicesMenuForType(DeviceType type) {
- scoped_refptr<MediaCaptureDevicesDispatcher> dispatcher =
- MediaInternals::GetInstance()->GetMediaCaptureDevicesDispatcher();
content::MediaStreamDevices devices;
switch (type) {
case AUDIO:
- devices = dispatcher->GetAudioCaptureDevices();
+ devices = MediaCaptureDevicesDispatcher::GetInstance()->
+ GetAudioCaptureDevices();
break;
case VIDEO:
- devices = dispatcher->GetVideoCaptureDevices();
+ devices = MediaCaptureDevicesDispatcher::GetInstance()->
+ GetVideoCaptureDevices();
break;
}

Powered by Google App Engine
This is Rietveld 408576698