From f18290df038fc2156ad5540a002aa4371c32b999 Mon Sep 17 00:00:00 2001 From: georgesak Date: Thu, 29 Oct 2015 12:52:45 -0700 Subject: Revert of webcamPrivate API: Fix regression from r351343. (patchset #7 id:130001 of https://codereview.chromium.org/1412673007/ ) Reason for revert: Suspected of breaking Chrome OS compilation. http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20GN%20%28dbg%29/builds/11367/steps/compile/logs/stdio Original issue's description: > webcamPrivate API: Fix regression from r351343. > > Additionally: > - Add unit test to test for this regression. > - Modify classes to support VISCA webcam unit tests. > - Modify VISCA webcam code to simplify code and to be more robust > against bad responses. > > BUG=548043 > > Committed: https://crrev.com/d088b80e0203d6f819a714d39ef87221a02549f9 > Cr-Commit-Position: refs/heads/master@{#356910} TBR=xdai@chromium.org,rockot@chromium.org,thestig@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=548043 Review URL: https://codereview.chromium.org/1428803003 Cr-Commit-Position: refs/heads/master@{#356920} --- .../browser/api/webcam_private/webcam_private_api_chromeos.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'extensions/browser/api/webcam_private/webcam_private_api_chromeos.cc') diff --git a/extensions/browser/api/webcam_private/webcam_private_api_chromeos.cc b/extensions/browser/api/webcam_private/webcam_private_api_chromeos.cc index 02edcfa..ca7ad41 100644 --- a/extensions/browser/api/webcam_private/webcam_private_api_chromeos.cc +++ b/extensions/browser/api/webcam_private/webcam_private_api_chromeos.cc @@ -76,12 +76,10 @@ bool WebcamPrivateAPI::OpenSerialWebcam( if (webcam_resource) return false; - ViscaWebcam* visca_webcam = new ViscaWebcam; - visca_webcam->Open( - device_path, extension_id, - base::Bind(&WebcamPrivateAPI::OnOpenSerialWebcam, - weak_ptr_factory_.GetWeakPtr(), extension_id, device_path, - make_scoped_refptr(visca_webcam), callback)); + ViscaWebcam* visca_webcam(new ViscaWebcam(device_path, extension_id)); + visca_webcam->Open(base::Bind( + &WebcamPrivateAPI::OnOpenSerialWebcam, weak_ptr_factory_.GetWeakPtr(), + extension_id, device_path, make_scoped_refptr(visca_webcam), callback)); return true; } -- cgit v1.1