| 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 96fc5a10b2edcf228aacc628c3cc887dcf7a4b3c..4e5b02587e1b3d5fa77ba6187174cdbd82488f1c 100644
|
| --- a/content/browser/renderer_host/media/video_capture_manager.cc
|
| +++ b/content/browser/renderer_host/media/video_capture_manager.cc
|
| @@ -29,10 +29,10 @@
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/desktop_media_id.h"
|
| #include "content/public/common/media_stream_request.h"
|
| +#include "device/capture/video/video_capture_device.h"
|
| +#include "device/capture/video/video_capture_device_factory.h"
|
| #include "media/base/bind_to_current_loop.h"
|
| #include "media/base/media_switches.h"
|
| -#include "media/capture/video/video_capture_device.h"
|
| -#include "media/capture/video/video_capture_device_factory.h"
|
|
|
| #if defined(ENABLE_SCREEN_CAPTURE)
|
| #include "content/browser/media/capture/desktop_capture_device.h"
|
| @@ -142,7 +142,7 @@ class VideoCaptureManager::DeviceEntry {
|
| const media::VideoCaptureParams parameters;
|
|
|
| VideoCaptureController* video_capture_controller() const;
|
| - media::VideoCaptureDevice* video_capture_device() const;
|
| + device::VideoCaptureDevice* video_capture_device() const;
|
|
|
| void SetVideoCaptureDevice(std::unique_ptr<VideoCaptureDevice> device);
|
| std::unique_ptr<VideoCaptureDevice> ReleaseVideoCaptureDevice();
|
| @@ -155,16 +155,16 @@ class VideoCaptureManager::DeviceEntry {
|
| base::ThreadChecker thread_checker_;
|
| };
|
|
|
| -// Bundles a media::VideoCaptureDeviceDescriptor with corresponding supported
|
| +// Bundles a device::VideoCaptureDeviceDescriptor with corresponding supported
|
| // video formats.
|
| struct VideoCaptureManager::DeviceInfo {
|
| DeviceInfo();
|
| - DeviceInfo(media::VideoCaptureDeviceDescriptor descriptor);
|
| + DeviceInfo(device::VideoCaptureDeviceDescriptor descriptor);
|
| DeviceInfo(const DeviceInfo& other);
|
| ~DeviceInfo();
|
| DeviceInfo& operator=(const DeviceInfo& other);
|
|
|
| - media::VideoCaptureDeviceDescriptor descriptor;
|
| + device::VideoCaptureDeviceDescriptor descriptor;
|
| media::VideoCaptureFormats supported_formats;
|
| };
|
|
|
| @@ -206,7 +206,7 @@ VideoCaptureManager::DeviceEntry::DeviceEntry(
|
| VideoCaptureManager::DeviceEntry::~DeviceEntry() {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| // DCHECK that this DeviceEntry does not still own a
|
| - // media::VideoCaptureDevice. media::VideoCaptureDevice must be deleted on
|
| + // device::VideoCaptureDevice. media::VideoCaptureDevice must be deleted on
|
| // the device thread.
|
| DCHECK(video_capture_device_ == nullptr);
|
| }
|
| @@ -217,7 +217,7 @@ void VideoCaptureManager::DeviceEntry::SetVideoCaptureDevice(
|
| video_capture_device_.swap(device);
|
| }
|
|
|
| -std::unique_ptr<media::VideoCaptureDevice>
|
| +std::unique_ptr<device::VideoCaptureDevice>
|
| VideoCaptureManager::DeviceEntry::ReleaseVideoCaptureDevice() {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| return std::move(video_capture_device_);
|
| @@ -229,7 +229,7 @@ VideoCaptureManager::DeviceEntry::video_capture_controller() const {
|
| return video_capture_controller_.get();
|
| }
|
|
|
| -media::VideoCaptureDevice*
|
| +device::VideoCaptureDevice*
|
| VideoCaptureManager::DeviceEntry::video_capture_device() const {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| return video_capture_device_.get();
|
| @@ -238,7 +238,7 @@ VideoCaptureManager::DeviceEntry::video_capture_device() const {
|
| VideoCaptureManager::DeviceInfo::DeviceInfo() = default;
|
|
|
| VideoCaptureManager::DeviceInfo::DeviceInfo(
|
| - media::VideoCaptureDeviceDescriptor descriptor)
|
| + device::VideoCaptureDeviceDescriptor descriptor)
|
| : descriptor(descriptor) {}
|
|
|
| VideoCaptureManager::DeviceInfo::DeviceInfo(
|
| @@ -260,7 +260,7 @@ VideoCaptureManager::CaptureDeviceStartRequest::CaptureDeviceStartRequest(
|
| }
|
|
|
| VideoCaptureManager::VideoCaptureManager(
|
| - std::unique_ptr<media::VideoCaptureDeviceFactory> factory)
|
| + std::unique_ptr<device::VideoCaptureDeviceFactory> factory)
|
| : listener_(nullptr),
|
| new_capture_session_id_(1),
|
| video_capture_device_factory_(std::move(factory)) {}
|
| @@ -319,7 +319,7 @@ void VideoCaptureManager::EnumerateDevices(MediaStreamType stream_type) {
|
| // bound in |devices_enumerated_callback|.
|
| device_task_runner_->PostTask(
|
| FROM_HERE,
|
| - base::Bind(&media::VideoCaptureDeviceFactory::EnumerateDeviceDescriptors,
|
| + base::Bind(&device::VideoCaptureDeviceFactory::EnumerateDeviceDescriptors,
|
| base::Unretained(video_capture_device_factory_.get()),
|
| devices_enumerated_callback));
|
| }
|
| @@ -525,7 +525,7 @@ void VideoCaptureManager::OnDeviceStarted(
|
| // DoStartDeviceCaptureOnDeviceThread.
|
| // The device is no longer wanted. Stop the device again.
|
| DVLOG(3) << "OnDeviceStarted but start request have been aborted.";
|
| - media::VideoCaptureDevice* device_ptr = device.get();
|
| + device::VideoCaptureDevice* device_ptr = device.get();
|
| base::Closure closure =
|
| base::Bind(&VideoCaptureManager::DoStopDeviceOnDeviceThread, this,
|
| base::Passed(&device));
|
| @@ -551,7 +551,7 @@ void VideoCaptureManager::OnDeviceStarted(
|
| HandleQueuedStartRequest();
|
| }
|
|
|
| -std::unique_ptr<media::VideoCaptureDevice>
|
| +std::unique_ptr<device::VideoCaptureDevice>
|
| VideoCaptureManager::DoStartDeviceCaptureOnDeviceThread(
|
| const VideoCaptureDeviceDescriptor& descriptor,
|
| const media::VideoCaptureParams& params,
|
| @@ -572,7 +572,7 @@ VideoCaptureManager::DoStartDeviceCaptureOnDeviceThread(
|
| return video_capture_device;
|
| }
|
|
|
| -std::unique_ptr<media::VideoCaptureDevice>
|
| +std::unique_ptr<device::VideoCaptureDevice>
|
| VideoCaptureManager::DoStartTabCaptureOnDeviceThread(
|
| const std::string& id,
|
| const media::VideoCaptureParams& params,
|
| @@ -592,7 +592,7 @@ VideoCaptureManager::DoStartTabCaptureOnDeviceThread(
|
| return video_capture_device;
|
| }
|
|
|
| -std::unique_ptr<media::VideoCaptureDevice>
|
| +std::unique_ptr<device::VideoCaptureDevice>
|
| VideoCaptureManager::DoStartDesktopCaptureOnDeviceThread(
|
| const std::string& id,
|
| const media::VideoCaptureParams& params,
|
| @@ -754,7 +754,7 @@ void VideoCaptureManager::RequestRefreshFrameForClient(
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
|
|
| if (DeviceEntry* entry = GetDeviceEntryByController(controller)) {
|
| - if (media::VideoCaptureDevice* device = entry->video_capture_device()) {
|
| + if (device::VideoCaptureDevice* device = entry->video_capture_device()) {
|
| device_task_runner_->PostTask(
|
| FROM_HERE,
|
| base::Bind(&VideoCaptureDevice::RequestRefreshFrame,
|
| @@ -950,7 +950,7 @@ void VideoCaptureManager::OnDevicesInfoEnumerated(
|
| // Walk the |devices_info_cache_| and transform from
|
| // VideoCaptureDeviceDescriptor to StreamDeviceInfo for return purposes.
|
| StreamDeviceInfoArray devices;
|
| - std::vector<std::tuple<media::VideoCaptureDeviceDescriptor,
|
| + std::vector<std::tuple<device::VideoCaptureDeviceDescriptor,
|
| media::VideoCaptureFormats>>
|
| descriptors_and_formats;
|
| for (const auto& it : devices_info_cache_) {
|
| @@ -1025,7 +1025,7 @@ void VideoCaptureManager::DestroyDeviceEntryIfNoClients(DeviceEntry* entry) {
|
| }
|
| }
|
|
|
| -media::VideoCaptureDevice*
|
| +device::VideoCaptureDevice*
|
| VideoCaptureManager::GetVideoCaptureDeviceBySessionId(int session_id) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| SessionMap::const_iterator session_it = sessions_.find(session_id);
|
| @@ -1114,7 +1114,7 @@ VideoCaptureManager::DeviceEntry* VideoCaptureManager::GetOrCreateDeviceEntry(
|
| }
|
|
|
| void VideoCaptureManager::SetDesktopCaptureWindowIdOnDeviceThread(
|
| - media::VideoCaptureDevice* device,
|
| + device::VideoCaptureDevice* device,
|
| gfx::NativeViewId window_id) {
|
| DCHECK(IsOnDeviceThread());
|
| #if defined(ENABLE_SCREEN_CAPTURE)
|
|
|