| Index: content/browser/renderer_host/media/video_capture_manager.cc
|
| diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc
|
| index 7a28856273673092a84a4d761b278ab9dec96c7e..7ea768be035b63e7f7e9fa14c813b2d1b4ce51b6 100644
|
| --- a/content/browser/renderer_host/media/video_capture_manager.cc
|
| +++ b/content/browser/renderer_host/media/video_capture_manager.cc
|
| @@ -14,6 +14,7 @@
|
| #include "base/task_runner_util.h"
|
| #include "base/threading/sequenced_worker_pool.h"
|
| #include "content/browser/media/capture/web_contents_video_capture_device.h"
|
| +#include "content/browser/media/media_internals.h"
|
| #include "content/browser/renderer_host/media/video_capture_controller.h"
|
| #include "content/browser/renderer_host/media/video_capture_controller_event_handler.h"
|
| #include "content/public/browser/browser_thread.h"
|
| @@ -105,15 +106,6 @@ VideoCaptureManager::DeviceEntry::DeviceEntry(
|
|
|
| VideoCaptureManager::DeviceEntry::~DeviceEntry() {}
|
|
|
| -VideoCaptureManager::DeviceInfo::DeviceInfo() {}
|
| -
|
| -VideoCaptureManager::DeviceInfo::DeviceInfo(
|
| - const media::VideoCaptureDevice::Name& name,
|
| - const media::VideoCaptureFormats& supported_formats)
|
| - : name(name),
|
| - supported_formats(supported_formats) {}
|
| -
|
| -VideoCaptureManager::DeviceInfo::~DeviceInfo() {}
|
|
|
| VideoCaptureManager::VideoCaptureManager(
|
| scoped_ptr<media::VideoCaptureDeviceFactory> factory)
|
| @@ -560,14 +552,20 @@ void VideoCaptureManager::OnDevicesInfoEnumerated(
|
| }
|
| devices_info_cache_ = new_devices_info_cache;
|
|
|
| + // Send an update to MediaInternals about enumerated capabilities later.
|
| + BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, base::Bind(
|
| + &MediaInternals::UpdateVideoCaptureDeviceCapabilities,
|
| + base::Unretained(MediaInternals::GetInstance()),
|
| + devices_info_cache_));
|
| +
|
| // Walk the |devices_info_cache_| and transform from VCD::Name to
|
| // StreamDeviceInfo for return purposes.
|
| StreamDeviceInfoArray devices;
|
| - for (DeviceInfos::const_iterator it = devices_info_cache_.begin();
|
| - it != devices_info_cache_.end(); ++it) {
|
| + for (const auto &it : devices_info_cache_) {
|
| devices.push_back(StreamDeviceInfo(
|
| - stream_type, it->name.GetNameAndModel(), it->name.id()));
|
| + stream_type, it.name.GetNameAndModel(), it.name.id()));
|
| }
|
| +
|
| listener_->DevicesEnumerated(stream_type, devices);
|
| }
|
|
|
| @@ -603,7 +601,6 @@ void VideoCaptureManager::ConsolidateDevicesInfoOnDeviceThread(
|
| for (media::VideoCaptureDevice::Names::const_iterator it =
|
| names_snapshot->begin();
|
| it != names_snapshot->end(); ++it) {
|
| - media::VideoCaptureFormats supported_formats;
|
| DeviceInfo device_info(*it, media::VideoCaptureFormats());
|
| video_capture_device_factory_->GetDeviceSupportedFormats(
|
| *it, &(device_info.supported_formats));
|
|
|