Chromium Code Reviews| Index: content/browser/media/capture/web_contents_video_capture_device.cc |
| diff --git a/content/browser/media/capture/web_contents_video_capture_device.cc b/content/browser/media/capture/web_contents_video_capture_device.cc |
| index f269ee4754a96510c4715f20d00a26dd8b6d59be..1d1eb43424cc3ae99c66b1ad52897ab13077102e 100644 |
| --- a/content/browser/media/capture/web_contents_video_capture_device.cc |
| +++ b/content/browser/media/capture/web_contents_video_capture_device.cc |
| @@ -950,19 +950,18 @@ WebContentsVideoCaptureDevice::~WebContentsVideoCaptureDevice() { |
| } |
| // static |
| -media::VideoCaptureDevice* WebContentsVideoCaptureDevice::Create( |
| - const std::string& device_id) { |
| +std::unique_ptr<media::VideoCaptureDevice> |
| +WebContentsVideoCaptureDevice::Create(const std::string& device_id) { |
| // Parse device_id into render_process_id and main_render_frame_id. |
| - int render_process_id = -1; |
| - int main_render_frame_id = -1; |
| - if (!WebContentsMediaCaptureId::ExtractTabCaptureTarget( |
| - device_id, &render_process_id, &main_render_frame_id)) { |
| + WebContentsMediaCaptureId media_id; |
| + if (!WebContentsMediaCaptureId::Parse(device_id, &media_id)) { |
| return NULL; |
| } |
| - return new WebContentsVideoCaptureDevice( |
| - render_process_id, main_render_frame_id, |
| - WebContentsMediaCaptureId::IsAutoThrottlingOptionSet(device_id)); |
| + return std::unique_ptr<media::VideoCaptureDevice>( |
|
Sergey Ulanov
2016/10/12 22:21:01
nit:: use base::MakeUnique<WebContentsVideoCapture
qiangchen
2016/10/12 22:49:54
Not work. As media::VideoCaptureDevice is an abstr
|
| + new WebContentsVideoCaptureDevice(media_id.render_process_id, |
| + media_id.main_render_frame_id, |
| + media_id.enable_auto_throttling)); |
| } |
| void WebContentsVideoCaptureDevice::AllocateAndStart( |