Chromium Code Reviews| Index: content/renderer/pepper/pepper_platform_video_capture.cc |
| diff --git a/content/renderer/pepper/pepper_platform_video_capture.cc b/content/renderer/pepper/pepper_platform_video_capture.cc |
| index dc58ad44e68570aecd07095c60b3f1043b90c601..aba75550021c1e5d8f80e41797774cfd797da723 100644 |
| --- a/content/renderer/pepper/pepper_platform_video_capture.cc |
| +++ b/content/renderer/pepper/pepper_platform_video_capture.cc |
| @@ -28,7 +28,6 @@ PepperPlatformVideoCapture::PepperPlatformVideoCapture( |
| handler_proxy_(new media::VideoCaptureHandlerProxy( |
| this, base::MessageLoopProxy::current())), |
| handler_(handler), |
| - video_capture_(NULL), |
| unbalanced_start_(false), |
| pending_open_device_(false), |
| pending_open_device_id_(-1) { |
| @@ -83,12 +82,8 @@ void PepperPlatformVideoCapture::DetachEventHandler() { |
| handler_ = NULL; |
| StopCapture(NULL); |
| - if (video_capture_) { |
| - VideoCaptureImplManager* manager = |
| - RenderThreadImpl::current()->video_capture_impl_manager(); |
| - manager->RemoveDevice(session_id_, handler_proxy_.get()); |
| - video_capture_ = NULL; |
| - } |
| + if (video_capture_) |
|
Ami GONE FROM CHROMIUM
2014/01/06 23:37:14
nit: don't need the conditional
Alpha Left Google
2014/01/08 00:23:36
Done.
|
| + video_capture_.reset(); |
| if (render_view_.get()) { |
| if (!label_.empty()) { |
| @@ -147,7 +142,7 @@ PepperPlatformVideoCapture::~PepperPlatformVideoCapture() { |
| void PepperPlatformVideoCapture::Initialize() { |
| VideoCaptureImplManager* manager = |
| RenderThreadImpl::current()->video_capture_impl_manager(); |
| - video_capture_ = manager->AddDevice(session_id_, handler_proxy_.get()); |
| + video_capture_ = manager->UseDevice(session_id_); |
| } |
| void PepperPlatformVideoCapture::OnDeviceOpened(int request_id, |