Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Issue 1952463002: Media Stream Image Capture (4): wire takePhoto and implement in FakeVCDevice (Closed)

Created:
4 years, 7 months ago by mcasas
Modified:
4 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch+vc_chromium.org, miu+watch_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Media Stream Image Capture (4): wire takePhoto and implement in FakeVCDevice This CL wires the takePhoto() call from ImageCaptureImpl, via MediaStreamManager and VideoCaptureManager, to VideoCaptureDevice. It also implements it for the Fake Video CaptureDevice, and extends its unit test. Note the multiple thread-hopping: MSM can only be accessed on UI thread, where the Mojo callback has to be Run back. VCManager and FakeVCD live on the IO thread. (In the future, some platform-VCDevices have even more threads!). BUG=518807 TEST= run demo html in https://rawgit.com/Miguelao/demos/master/imagecapture.html with flag --enable-blink-features=ImageCapture (click on "Open Camera 320x240", then on "Create Image Capturer" and finally, repeatedly, on "takePhoto"). Committed: https://crrev.com/c67c0bc29e2ce52567af8f769134bd067ba2615b Cr-Commit-Position: refs/heads/master@{#392350}

Patch Set 1 : unittests #

Total comments: 15

Patch Set 2 : miu@s comments #

Total comments: 10

Patch Set 3 : miu@s second round of comments #

Total comments: 2

Patch Set 4 : forgotten "!" and rebase #

Total comments: 12

Patch Set 5 : tommi@ and mlamouri@ comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -16 lines) Patch
M content/browser/media/capture/image_capture_impl.cc View 1 2 3 2 chunks +48 lines, -5 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.cc View 1 chunk +15 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.cc View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
M media/capture/video/fake_video_capture_device.h View 1 chunk +1 line, -0 lines 0 comments Download
M media/capture/video/fake_video_capture_device.cc View 1 2 3 chunks +32 lines, -0 lines 0 comments Download
M media/capture/video/fake_video_capture_device_unittest.cc View 1 2 3 4 4 chunks +47 lines, -4 lines 0 comments Download
M media/capture/video/video_capture_device.h View 1 1 chunk +10 lines, -0 lines 0 comments Download
M media/capture/video/video_capture_device.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/imagecapture/ImageCapture-takePhoto.html View 1 2 3 4 1 chunk +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp View 1 2 3 1 chunk +6 lines, -3 lines 0 comments Download

Messages

Total messages: 34 (19 generated)
mcasas
miu@ PTAL at the content/ parts.
4 years, 7 months ago (2016-05-04 18:25:12 UTC) #10
miu
https://codereview.chromium.org/1952463002/diff/120001/content/browser/media/capture/image_capture_impl.cc File content/browser/media/capture/image_capture_impl.cc (right): https://codereview.chromium.org/1952463002/diff/120001/content/browser/media/capture/image_capture_impl.cc#newcode8 content/browser/media/capture/image_capture_impl.cc:8: #include "content/browser/browser_main_loop.h" Doesn't look like this include is needed. ...
4 years, 7 months ago (2016-05-04 23:45:50 UTC) #11
mcasas
PTAL https://codereview.chromium.org/1952463002/diff/120001/content/browser/media/capture/image_capture_impl.cc File content/browser/media/capture/image_capture_impl.cc (right): https://codereview.chromium.org/1952463002/diff/120001/content/browser/media/capture/image_capture_impl.cc#newcode8 content/browser/media/capture/image_capture_impl.cc:8: #include "content/browser/browser_main_loop.h" On 2016/05/04 23:45:50, miu wrote: > ...
4 years, 7 months ago (2016-05-05 00:57:13 UTC) #13
miu
https://codereview.chromium.org/1952463002/diff/120001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): https://codereview.chromium.org/1952463002/diff/120001/content/browser/renderer_host/media/media_stream_manager.cc#newcode600 content/browser/renderer_host/media/media_stream_manager.cc:600: int MediaStreamManager::VideoDeviceIdToSessionId( On 2016/05/05 00:57:12, mcasas wrote: > On ...
4 years, 7 months ago (2016-05-05 22:04:24 UTC) #14
mcasas
PTAL https://codereview.chromium.org/1952463002/diff/140002/content/browser/media/capture/image_capture_impl.cc File content/browser/media/capture/image_capture_impl.cc (right): https://codereview.chromium.org/1952463002/diff/140002/content/browser/media/capture/image_capture_impl.cc#newcode23 content/browser/media/capture/image_capture_impl.cc:23: if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { On 2016/05/05 22:04:24, miu wrote: ...
4 years, 7 months ago (2016-05-05 23:05:50 UTC) #15
miu
lgtm % nit: https://codereview.chromium.org/1952463002/diff/190001/content/browser/media/capture/image_capture_impl.cc File content/browser/media/capture/image_capture_impl.cc (right): https://codereview.chromium.org/1952463002/diff/190001/content/browser/media/capture/image_capture_impl.cc#newcode31 content/browser/media/capture/image_capture_impl.cc:31: base::Bind(&RunMojoCallback, callback, mime_type, This is fine, ...
4 years, 7 months ago (2016-05-06 18:24:02 UTC) #17
mcasas
haraken@ or mlamouri@ can you please RS the micro changes in third_party/WebKit? Thanks! https://codereview.chromium.org/1952463002/diff/190001/content/browser/media/capture/image_capture_impl.cc File ...
4 years, 7 months ago (2016-05-06 19:20:44 UTC) #19
mcasas
tommi@: PTAL at media_stream_manager and video_capture_manager changes or forward appropriately, thanks!
4 years, 7 months ago (2016-05-06 19:21:26 UTC) #21
haraken
WebKit LGTM.
4 years, 7 months ago (2016-05-07 02:46:04 UTC) #24
tommi (sloooow) - chröme
lgtm % some minor comments. please check if we're copying the data unnecessarily there. https://codereview.chromium.org/1952463002/diff/250001/content/browser/media/capture/image_capture_impl.cc ...
4 years, 7 months ago (2016-05-09 11:17:33 UTC) #25
mlamouri (slow - plz ping)
Blink changes lgtm https://codereview.chromium.org/1952463002/diff/250001/third_party/WebKit/LayoutTests/fast/imagecapture/ImageCapture-takePhoto.html File third_party/WebKit/LayoutTests/fast/imagecapture/ImageCapture-takePhoto.html (right): https://codereview.chromium.org/1952463002/diff/250001/third_party/WebKit/LayoutTests/fast/imagecapture/ImageCapture-takePhoto.html#newcode28 third_party/WebKit/LayoutTests/fast/imagecapture/ImageCapture-takePhoto.html:28: // promise will be rejected. Are ...
4 years, 7 months ago (2016-05-09 12:44:35 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1952463002/270001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1952463002/270001
4 years, 7 months ago (2016-05-09 16:34:13 UTC) #29
mcasas
https://codereview.chromium.org/1952463002/diff/250001/content/browser/media/capture/image_capture_impl.cc File content/browser/media/capture/image_capture_impl.cc (right): https://codereview.chromium.org/1952463002/diff/250001/content/browser/media/capture/image_capture_impl.cc#newcode21 content/browser/media/capture/image_capture_impl.cc:21: mojo::Array<uint8_t> data) { On 2016/05/09 11:17:32, tommi-chrömium wrote: > ...
4 years, 7 months ago (2016-05-09 16:48:41 UTC) #30
commit-bot: I haz the power
Committed patchset #5 (id:270001)
4 years, 7 months ago (2016-05-09 17:27:07 UTC) #32
commit-bot: I haz the power
4 years, 7 months ago (2016-05-09 17:28:40 UTC) #34
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/c67c0bc29e2ce52567af8f769134bd067ba2615b
Cr-Commit-Position: refs/heads/master@{#392350}

Powered by Google App Engine
This is Rietveld 408576698