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

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

Issue 530983002: Mac Video Capture: Connect AVFoundation for Dev Channel builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 // MediaCaptureDevicesDispatcher is a singleton. It should be created on 294 // MediaCaptureDevicesDispatcher is a singleton. It should be created on
295 // UI thread. Otherwise, it will not receive 295 // UI thread. Otherwise, it will not receive
296 // content::NOTIFICATION_WEB_CONTENTS_DESTROYED, and that will result in 296 // content::NOTIFICATION_WEB_CONTENTS_DESTROYED, and that will result in
297 // possible use after free. 297 // possible use after free.
298 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 298 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
299 notifications_registrar_.Add( 299 notifications_registrar_.Add(
300 this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED, 300 this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
301 content::NotificationService::AllSources()); 301 content::NotificationService::AllSources());
302 302
303 // AVFoundation is used for video/audio device monitoring and video capture in 303 // AVFoundation is used for video/audio device monitoring and video capture in
304 // Mac. Experimentally, connect it in Canary and Unknown (developer builds). 304 // Mac. Experimentally, connect it in Dev, Canary and Unknown (developer
305 // builds).
305 #if defined(OS_MACOSX) 306 #if defined(OS_MACOSX)
306 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); 307 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
307 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kForceQTKit)) { 308 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kForceQTKit)) {
308 if (channel == chrome::VersionInfo::CHANNEL_CANARY || 309 if (channel == chrome::VersionInfo::CHANNEL_DEV ||
310 channel == chrome::VersionInfo::CHANNEL_CANARY ||
309 channel == chrome::VersionInfo::CHANNEL_UNKNOWN) { 311 channel == chrome::VersionInfo::CHANNEL_UNKNOWN) {
310 CommandLine::ForCurrentProcess()->AppendSwitch( 312 CommandLine::ForCurrentProcess()->AppendSwitch(
311 switches::kEnableAVFoundation); 313 switches::kEnableAVFoundation);
312 } 314 }
313 } 315 }
314 #endif 316 #endif
315 } 317 }
316 318
317 MediaCaptureDevicesDispatcher::~MediaCaptureDevicesDispatcher() {} 319 MediaCaptureDevicesDispatcher::~MediaCaptureDevicesDispatcher() {}
318 320
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 1090
1089 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices( 1091 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices(
1090 const MediaStreamDevices& devices) { 1092 const MediaStreamDevices& devices) {
1091 test_audio_devices_ = devices; 1093 test_audio_devices_ = devices;
1092 } 1094 }
1093 1095
1094 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices( 1096 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices(
1095 const MediaStreamDevices& devices) { 1097 const MediaStreamDevices& devices) {
1096 test_video_devices_ = devices; 1098 test_video_devices_ = devices;
1097 } 1099 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698