| Index: content/browser/renderer_host/media/video_capture_manager.cc
|
| ===================================================================
|
| --- content/browser/renderer_host/media/video_capture_manager.cc (revision 164646)
|
| +++ content/browser/renderer_host/media/video_capture_manager.cc (working copy)
|
| @@ -17,10 +17,8 @@
|
| #include "media/video/capture/fake_video_capture_device.h"
|
| #include "media/video/capture/video_capture_device.h"
|
|
|
| -using content::BrowserThread;
|
| +namespace content {
|
|
|
| -namespace media_stream {
|
| -
|
| // Starting id for the first capture session.
|
| // VideoCaptureManager::kStartOpenSessionId is used as default id without
|
| // explicitly calling open device.
|
| @@ -133,8 +131,7 @@
|
| bool opened = DeviceOpened(*it);
|
| // NOTE: Only support enumeration of the MEDIA_DEVICE_VIDEO_CAPTURE type.
|
| devices.push_back(StreamDeviceInfo(
|
| - content::MEDIA_DEVICE_VIDEO_CAPTURE, it->device_name,
|
| - it->unique_id, opened));
|
| + MEDIA_DEVICE_VIDEO_CAPTURE, it->device_name, it->unique_id, opened));
|
| }
|
|
|
| PostOnDevicesEnumerated(devices);
|
| @@ -167,12 +164,12 @@
|
| media::FakeVideoCaptureDevice::Create(vc_device_name);
|
| } else {
|
| switch (device.stream_type) {
|
| - case content::MEDIA_DEVICE_VIDEO_CAPTURE:
|
| + case MEDIA_DEVICE_VIDEO_CAPTURE:
|
| video_capture_device =
|
| media::VideoCaptureDevice::Create(vc_device_name);
|
| break;
|
| - case content::MEDIA_TAB_VIDEO_CAPTURE:
|
| - video_capture_device = content::WebContentsVideoCaptureDevice::Create(
|
| + case MEDIA_TAB_VIDEO_CAPTURE:
|
| + video_capture_device = WebContentsVideoCaptureDevice::Create(
|
| vc_device_name.unique_id);
|
| break;
|
| default:
|
| @@ -289,7 +286,7 @@
|
| }
|
| }
|
|
|
| -void VideoCaptureManager::OnOpened(content::MediaStreamDeviceType stream_type,
|
| +void VideoCaptureManager::OnOpened(MediaStreamDeviceType stream_type,
|
| int capture_session_id) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| if (!listener_) {
|
| @@ -299,7 +296,7 @@
|
| listener_->Opened(stream_type, capture_session_id);
|
| }
|
|
|
| -void VideoCaptureManager::OnClosed(content::MediaStreamDeviceType stream_type,
|
| +void VideoCaptureManager::OnClosed(MediaStreamDeviceType stream_type,
|
| int capture_session_id) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| if (!listener_) {
|
| @@ -317,10 +314,10 @@
|
| return;
|
| }
|
| // NOTE: Only support enumeration of the MEDIA_DEVICE_VIDEO_CAPTURE type.
|
| - listener_->DevicesEnumerated(content::MEDIA_DEVICE_VIDEO_CAPTURE, devices);
|
| + listener_->DevicesEnumerated(MEDIA_DEVICE_VIDEO_CAPTURE, devices);
|
| }
|
|
|
| -void VideoCaptureManager::OnError(content::MediaStreamDeviceType stream_type,
|
| +void VideoCaptureManager::OnError(MediaStreamDeviceType stream_type,
|
| int capture_session_id,
|
| MediaStreamProviderError error) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| @@ -332,7 +329,7 @@
|
| }
|
|
|
| void VideoCaptureManager::PostOnOpened(
|
| - content::MediaStreamDeviceType stream_type, int capture_session_id) {
|
| + MediaStreamDeviceType stream_type, int capture_session_id) {
|
| DCHECK(IsOnDeviceThread());
|
| BrowserThread::PostTask(BrowserThread::IO,
|
| FROM_HERE,
|
| @@ -341,7 +338,7 @@
|
| }
|
|
|
| void VideoCaptureManager::PostOnClosed(
|
| - content::MediaStreamDeviceType stream_type, int capture_session_id) {
|
| + MediaStreamDeviceType stream_type, int capture_session_id) {
|
| DCHECK(IsOnDeviceThread());
|
| BrowserThread::PostTask(BrowserThread::IO,
|
| FROM_HERE,
|
| @@ -361,8 +358,7 @@
|
| void VideoCaptureManager::PostOnError(int capture_session_id,
|
| MediaStreamProviderError error) {
|
| DCHECK(IsOnDeviceThread());
|
| - content::MediaStreamDeviceType stream_type =
|
| - content::MEDIA_DEVICE_VIDEO_CAPTURE;
|
| + MediaStreamDeviceType stream_type = MEDIA_DEVICE_VIDEO_CAPTURE;
|
| VideoCaptureDevices::const_iterator it = devices_.find(capture_session_id);
|
| if (it != devices_.end())
|
| stream_type = it->second.stream_type;
|
| @@ -516,7 +512,7 @@
|
| return NULL;
|
| }
|
| // NOTE: Only support enumeration of the MEDIA_DEVICE_VIDEO_CAPTURE type.
|
| - StreamDeviceInfo device(content::MEDIA_DEVICE_VIDEO_CAPTURE,
|
| + StreamDeviceInfo device(MEDIA_DEVICE_VIDEO_CAPTURE,
|
| device_names.front().device_name,
|
| device_names.front().unique_id, false);
|
|
|
| @@ -531,4 +527,4 @@
|
| return NULL;
|
| }
|
|
|
| -} // namespace media_stream
|
| +} // namespace content
|
|
|