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

Side by Side Diff: chrome/browser/media/media_capture_devices_dispatcher.cc

Issue 443783003: Turn off AVFoundation field trial (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 5 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
6 6
7 #include "apps/app_window.h" 7 #include "apps/app_window.h"
8 #include "apps/app_window_registry.h" 8 #include "apps/app_window_registry.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 : is_device_enumeration_disabled_(false), 267 : is_device_enumeration_disabled_(false),
268 media_stream_capture_indicator_(new MediaStreamCaptureIndicator()) { 268 media_stream_capture_indicator_(new MediaStreamCaptureIndicator()) {
269 // MediaCaptureDevicesDispatcher is a singleton. It should be created on 269 // MediaCaptureDevicesDispatcher is a singleton. It should be created on
270 // UI thread. Otherwise, it will not receive 270 // UI thread. Otherwise, it will not receive
271 // content::NOTIFICATION_WEB_CONTENTS_DESTROYED, and that will result in 271 // content::NOTIFICATION_WEB_CONTENTS_DESTROYED, and that will result in
272 // possible use after free. 272 // possible use after free.
273 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 273 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
274 notifications_registrar_.Add( 274 notifications_registrar_.Add(
275 this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED, 275 this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
276 content::NotificationService::AllSources()); 276 content::NotificationService::AllSources());
277
278 // AVFoundation is used for video/audio device monitoring and video capture in
279 // Mac. Experimentally, connect it in Canary and Unknown (developer builds).
280 #if defined(OS_MACOSX)
andresp-chromium 2014/08/06 06:50:33 I wonder why this was here and not controlled by t
vrk (LEFT CHROMIUM) 2014/08/07 01:25:00 Acknowledged.
281 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
282 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kForceQTKit)) {
283 if (channel == chrome::VersionInfo::CHANNEL_CANARY ||
284 channel == chrome::VersionInfo::CHANNEL_UNKNOWN) {
285 CommandLine::ForCurrentProcess()->AppendSwitch(
286 switches::kEnableAVFoundation);
287 }
288 }
289 #endif
290 } 277 }
291 278
292 MediaCaptureDevicesDispatcher::~MediaCaptureDevicesDispatcher() {} 279 MediaCaptureDevicesDispatcher::~MediaCaptureDevicesDispatcher() {}
293 280
294 void MediaCaptureDevicesDispatcher::RegisterProfilePrefs( 281 void MediaCaptureDevicesDispatcher::RegisterProfilePrefs(
295 user_prefs::PrefRegistrySyncable* registry) { 282 user_prefs::PrefRegistrySyncable* registry) {
296 registry->RegisterStringPref( 283 registry->RegisterStringPref(
297 prefs::kDefaultAudioCaptureDevice, 284 prefs::kDefaultAudioCaptureDevice,
298 std::string(), 285 std::string(),
299 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 286 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 1000
1014 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices( 1001 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices(
1015 const MediaStreamDevices& devices) { 1002 const MediaStreamDevices& devices) {
1016 test_audio_devices_ = devices; 1003 test_audio_devices_ = devices;
1017 } 1004 }
1018 1005
1019 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices( 1006 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices(
1020 const MediaStreamDevices& devices) { 1007 const MediaStreamDevices& devices) {
1021 test_video_devices_ = devices; 1008 test_video_devices_ = devices;
1022 } 1009 }
OLDNEW
« no previous file with comments | « no previous file | media/video/capture/mac/avfoundation_glue.mm » ('j') | media/video/capture/mac/avfoundation_glue.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698