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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 183743021: Implement MediaCaptureDevices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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/content_settings/content_setting_bubble_model.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index 4632723f07fa99a50096337b862032209ccabaca..375e18152f2ddbc0c6be9f9fe1a3578084c16ff8 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -26,6 +26,7 @@
#include "chrome/common/content_settings.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
+#include "content/public/browser/media_capture_devices.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
@@ -40,6 +41,7 @@
#include "ui/base/resource/resource_bundle.h"
using base::UserMetricsAction;
+using content::MediaCaptureDevices;
using content::WebContents;
using content_settings::SettingInfo;
using content_settings::SettingSource;
@@ -793,10 +795,10 @@ void ContentSettingMediaStreamBubbleModel::SetMediaMenus() {
// Add microphone menu.
PrefService* prefs = profile()->GetPrefs();
- MediaCaptureDevicesDispatcher* dispatcher =
- MediaCaptureDevicesDispatcher::GetInstance();
+ MediaCaptureDevices* media_capture_devices =
+ MediaCaptureDevices::GetInstance();
const content::MediaStreamDevices& microphones =
- dispatcher->GetAudioCaptureDevices();
+ media_capture_devices->GetAudioCaptureDevices();
bool show_mic_menu =
(state_ == TabSpecificContentSettings::MICROPHONE_ACCESSED ||
@@ -834,7 +836,7 @@ void ContentSettingMediaStreamBubbleModel::SetMediaMenus() {
if (show_camera_menu) {
const content::MediaStreamDevices& cameras =
- dispatcher->GetVideoCaptureDevices();
+ media_capture_devices->GetVideoCaptureDevices();
MediaMenu camera_menu;
camera_menu.label =
l10n_util::GetStringUTF8(IDS_MEDIA_SELECTED_CAMERA_LABEL);
@@ -868,12 +870,12 @@ void ContentSettingMediaStreamBubbleModel::OnMediaMenuClicked(
DCHECK(type == content::MEDIA_DEVICE_AUDIO_CAPTURE ||
type == content::MEDIA_DEVICE_VIDEO_CAPTURE);
DCHECK_EQ(1U, bubble_content().media_menus.count(type));
- MediaCaptureDevicesDispatcher* dispatcher =
- MediaCaptureDevicesDispatcher::GetInstance();
+ MediaCaptureDevices* media_capture_devices =
+ MediaCaptureDevices::GetInstance();
const content::MediaStreamDevices& devices =
(type == content::MEDIA_DEVICE_AUDIO_CAPTURE) ?
- dispatcher->GetAudioCaptureDevices() :
- dispatcher->GetVideoCaptureDevices();
+ media_capture_devices->GetAudioCaptureDevices() :
+ media_capture_devices->GetVideoCaptureDevices();
set_selected_device(GetMediaDeviceById(selected_device_id, devices));
}

Powered by Google App Engine
This is Rietveld 408576698