| Index: content/browser/renderer_host/media/video_capture_host.cc
|
| ===================================================================
|
| --- content/browser/renderer_host/media/video_capture_host.cc (revision 137680)
|
| +++ content/browser/renderer_host/media/video_capture_host.cc (working copy)
|
| @@ -104,6 +104,12 @@
|
| this, id.device_id, width, height, frame_per_second));
|
| }
|
|
|
| +void VideoCaptureHost::OnPaused(const VideoCaptureControllerID& id) {
|
| + BrowserThread::PostTask(
|
| + BrowserThread::IO, FROM_HERE,
|
| + base::Bind(&VideoCaptureHost::DoPaused, this, id.device_id));
|
| +}
|
| +
|
| void VideoCaptureHost::OnReadyToDelete(const VideoCaptureControllerID& id) {
|
| BrowserThread::PostTask(
|
| BrowserThread::IO, FROM_HERE,
|
| @@ -143,6 +149,19 @@
|
| controller->StopCapture(id, this, false);
|
| }
|
|
|
| +void VideoCaptureHost::DoPaused(int device_id) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| +
|
| + VideoCaptureControllerID id(device_id);
|
| + EntryMap::iterator it = entries_.find(id);
|
| + if (it == entries_.end() || it->second->state == video_capture::kPaused)
|
| + return;
|
| +
|
| + it->second->state = video_capture::kPaused;
|
| + Send(new VideoCaptureMsg_StateChanged(device_id,
|
| + video_capture::kPaused));
|
| +}
|
| +
|
| void VideoCaptureHost::DoSendFrameInfo(int device_id,
|
| int width,
|
| int height,
|
|
|