Chromium Code Reviews| 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 4016235c8f8bc5d0fe09c6d4ddb9674612449837..6f728b28101d993266656270a50da7186744a93e 100644 |
| --- a/content/browser/renderer_host/media/video_capture_manager.cc |
| +++ b/content/browser/renderer_host/media/video_capture_manager.cc |
| @@ -668,6 +668,24 @@ void VideoCaptureManager::ResumeCaptureForClient( |
| controller->ResumeClient(client_id, client_handler); |
| } |
| +void VideoCaptureManager::RequestRefreshFrameForClient( |
| + VideoCaptureController* controller) { |
| + DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| + |
| + if (DeviceEntry* entry = GetDeviceEntryForController(controller)) { |
| + if (media::VideoCaptureDevice* device = entry->video_capture_device()) { |
| + device_task_runner_->PostTask( |
| + FROM_HERE, |
| + base::Bind(&media::VideoCaptureDevice::RequestRefreshFrame, |
|
xjz
2016/04/05 00:04:43
VideoCaptureDevice::RequestRefreshFrame() currentl
miu
2016/04/05 20:25:01
Yep! :) I'll ask you to review that one shortly.
|
| + // Unretained is safe to use here because |device| would be |
| + // null if it was scheduled for shutdown and destruction, |
| + // and because this task is guaranteed to run before the |
| + // task that destroys the |device|. |
| + base::Unretained(device))); |
| + } |
| + } |
| +} |
| + |
| bool VideoCaptureManager::GetDeviceSupportedFormats( |
| media::VideoCaptureSessionId capture_session_id, |
| media::VideoCaptureFormats* supported_formats) { |