| Index: content/browser/renderer_host/media/media_stream_manager.cc
|
| diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
|
| index 4af796f44ad7a4be83d3b8f2cfb27643b04f3a93..47496d84774b01225196958a7e7e888e9cb2d0ac 100644
|
| --- a/content/browser/renderer_host/media/media_stream_manager.cc
|
| +++ b/content/browser/renderer_host/media/media_stream_manager.cc
|
| @@ -30,10 +30,6 @@
|
| using content::BrowserThread;
|
| using content::MediaStreamRequest;
|
|
|
| -namespace {
|
| -const char kExtensionScheme[] = "chrome-extension";
|
| -} // namespace
|
| -
|
| namespace media_stream {
|
|
|
| // Creates a random label used to identify requests.
|
| @@ -248,7 +244,6 @@ void MediaStreamManager::GenerateStreamForDevice(
|
|
|
| if (!CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kEnableTabCapture) ||
|
| - !security_origin.SchemeIs(kExtensionScheme) ||
|
| (options.audio_type != content::MEDIA_TAB_AUDIO_CAPTURE &&
|
| options.audio_type != content::MEDIA_NO_SERVICE) ||
|
| (options.video_type != content::MEDIA_TAB_VIDEO_CAPTURE &&
|
| @@ -264,7 +259,6 @@ void MediaStreamManager::GenerateStreamForDevice(
|
| // |device_id| actually exists. Note that no such MediaStreamProvider API for
|
| // this currently exists. Also, we don't have a user-friendly device name for
|
| // the infobar UI.
|
| - StreamDeviceInfoArray devices;
|
| if (content::IsAudioMediaType(options.audio_type)) {
|
| // TODO(justinlin): Updating the state to requested and pending are no-ops
|
| // in terms of the media manager, but these are the state changes we want to
|
| @@ -273,22 +267,21 @@ void MediaStreamManager::GenerateStreamForDevice(
|
| content::MEDIA_REQUEST_STATE_REQUESTED);
|
| request.setState(options.audio_type,
|
| content::MEDIA_REQUEST_STATE_PENDING_APPROVAL);
|
| - devices.push_back(
|
| - StreamDeviceInfo(options.audio_type, device_id, device_id, false));
|
| + device_settings_->AvailableDevices(
|
| + *label, options.audio_type, StreamDeviceInfoArray(
|
| + 1, StreamDeviceInfo(options.audio_type, device_id, device_id,
|
| + false)));
|
| }
|
| if (content::IsVideoMediaType(options.video_type)) {
|
| request.setState(options.video_type,
|
| content::MEDIA_REQUEST_STATE_REQUESTED);
|
| request.setState(options.video_type,
|
| content::MEDIA_REQUEST_STATE_PENDING_APPROVAL);
|
| - devices.push_back(
|
| - StreamDeviceInfo(options.video_type, device_id, device_id, false));
|
| + device_settings_->AvailableDevices(
|
| + *label, options.video_type, StreamDeviceInfoArray(
|
| + 1, StreamDeviceInfo(options.video_type, device_id, device_id,
|
| + false)));
|
| }
|
| -
|
| - // Bypass the user authorization dropdown for tab capture.
|
| - BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
|
| - base::Bind(&MediaStreamManager::DevicesAccepted,
|
| - base::Unretained(this), *label, devices));
|
| }
|
|
|
| void MediaStreamManager::CancelGenerateStream(const std::string& label) {
|
|
|