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

Issue 10928043: Media Related changes for TabCapture API (Closed)

Created:
8 years, 3 months ago by justinlin
Modified:
7 years, 10 months ago
CC:
chromium-reviews, mihaip-chromium-reviews_chromium.org, feature-media-reviews_chromium.org, jam, joi+watch-content_chromium.org, Aaron Boodman, darin-cc_chromium.org, hclam
Visibility:
Public.

Description

This is the media related changes for tab capture API's: - Add new MediaObserver method to enable new tab capture chrome extension API's to be notified of stream request changes for Tab type streams. - Adds constants for chrome-specific MediaStreamConstraints: mediaSource and mediaSourceId to be used to request video/audio streams with tab media. - Plumbing/Tweaks to GenerateStreamForDevice for the API to work. Dependent change: http://codereview.chromium.org/11038021 BUG=153388 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161881

Patch Set 1 #

Patch Set 2 : Initial #

Total comments: 10

Patch Set 3 : Address comments, use MediaConstraints, split CL into 2. #

Patch Set 4 : Fix unit test #

Total comments: 47

Patch Set 5 : Address comments, fixes, make tab capture skip approval. #

Total comments: 12

Patch Set 6 : Review fixes #

Total comments: 34

Patch Set 7 : Review fixes #

Patch Set 8 : #

Total comments: 26

Patch Set 9 : #

Total comments: 4

Patch Set 10 : Review fixes, fix unit tests. #

Total comments: 14

Patch Set 11 : Review changes #

Patch Set 12 : Fix Windows build issue #

Total comments: 2

Patch Set 13 : rename REQUEST_*->MEDIA_REQUEST_* #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+279 lines, -202 lines) Patch
M chrome/browser/media/media_internals.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/media/media_internals.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/browser/media/media_internals_observer.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +10 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/media_stream_dispatcher_host.cc View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -28 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +0 lines, -35 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 20 chunks +122 lines, -45 lines 1 comment Download
M content/browser/renderer_host/media/mock_media_observer.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/media/media_stream_messages.h View 1 2 3 4 5 6 2 chunks +2 lines, -8 lines 0 comments Download
M content/common/media/media_stream_options.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -0 lines 0 comments Download
M content/common/media/media_stream_options.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/browser/media_observer.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -2 lines 0 comments Download
A content/public/browser/media_request_state.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +22 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_dispatcher.h View 1 2 3 4 5 6 2 chunks +2 lines, -12 lines 0 comments Download
M content/renderer/media/media_stream_dispatcher.cc View 1 2 3 4 5 6 7 8 2 chunks +1 line, -19 lines 0 comments Download
M content/renderer/media/media_stream_dispatcher_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -4 lines 0 comments Download
M content/renderer/media/media_stream_impl.cc View 1 2 3 4 5 6 7 8 9 5 chunks +53 lines, -9 lines 0 comments Download
M content/renderer/media/mock_media_stream_dispatcher.h View 1 2 3 4 5 6 1 chunk +1 line, -7 lines 0 comments Download
M content/renderer/media/mock_media_stream_dispatcher.cc View 1 2 3 4 5 6 2 chunks +1 line, -31 lines 0 comments Download

Messages

Total messages: 36 (0 generated)
justinlin
Hi tommyw@, perkj@, aa@, please take a look. There's still a few loose ends because ...
8 years, 3 months ago (2012-09-06 23:28:01 UTC) #1
perkj_chrome
Cool- I am afraid I can't help you much on the extension parts. Is the ...
8 years, 3 months ago (2012-09-07 11:41:48 UTC) #2
justinlin
Updated the patch set. I think it might be a little more clear now since ...
8 years, 2 months ago (2012-09-27 10:27:17 UTC) #3
perkj_chrome
I would recommend you try to split this cl. http://codereview.chromium.org/10928043/diff/14001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): http://codereview.chromium.org/10928043/diff/14001/content/browser/renderer_host/media/media_stream_manager.cc#newcode221 content/browser/renderer_host/media/media_stream_manager.cc:221: ...
8 years, 2 months ago (2012-09-27 13:21:48 UTC) #4
justinlin
On 2012/09/27 13:21:48, perkj wrote: > I would recommend you try to split this cl. ...
8 years, 2 months ago (2012-10-02 17:19:36 UTC) #5
justinlin
http://codereview.chromium.org/10928043/diff/14001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): http://codereview.chromium.org/10928043/diff/14001/content/browser/renderer_host/media/media_stream_manager.cc#newcode221 content/browser/renderer_host/media/media_stream_manager.cc:221: request.state[options.video_type] = On 2012/09/27 13:21:48, perkj wrote: > Why ...
8 years, 2 months ago (2012-10-02 17:19:48 UTC) #6
perkj_chrome
Sorry - I missed this. xians is better at the MediaStreamManager. I am not an ...
8 years, 2 months ago (2012-10-04 08:19:25 UTC) #7
perkj_chrome
http://codereview.chromium.org/10928043/diff/28001/content/public/common/media_stream_request.h File content/public/common/media_stream_request.h (right): http://codereview.chromium.org/10928043/diff/28001/content/public/common/media_stream_request.h#newcode18 content/public/common/media_stream_request.h:18: // MediaStreamConstraint keys. On 2012/10/04 08:19:25, perkj wrote: > ...
8 years, 2 months ago (2012-10-04 08:24:59 UTC) #8
justinlin
Great, thanks for the comments! I'll be more careful with style. And, sorry, to clarify ...
8 years, 2 months ago (2012-10-04 08:50:33 UTC) #9
no longer working on chromium
Hi Justin, I took a quick look, and found quite some questions/problems on the code. ...
8 years, 2 months ago (2012-10-04 18:41:48 UTC) #10
justinlin
Hi, thanks for the quick looks! Addressed the comments. Please take another look. xians: I ...
8 years, 2 months ago (2012-10-08 08:59:44 UTC) #11
justinlin
http://codereview.chromium.org/10928043/diff/28001/content/public/common/media_stream_request.h File content/public/common/media_stream_request.h (right): http://codereview.chromium.org/10928043/diff/28001/content/public/common/media_stream_request.h#newcode18 content/public/common/media_stream_request.h:18: // MediaStreamConstraint keys. On 2012/10/04 08:24:59, perkj wrote: > ...
8 years, 2 months ago (2012-10-08 18:50:03 UTC) #12
perkj_chrome
I have only looked at the MediaStreamImpl changes. http://codereview.chromium.org/10928043/diff/36001/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): http://codereview.chromium.org/10928043/diff/36001/content/browser/renderer_host/media/video_capture_manager.cc#newcode176 content/browser/renderer_host/media/video_capture_manager.cc:176: vc_device_name.unique_id ...
8 years, 2 months ago (2012-10-09 11:10:02 UTC) #13
miu
Agree with perkj@ on the changes to struct StreamOptions (and getting rid of GenerateStreamForDevice). Now ...
8 years, 2 months ago (2012-10-10 23:37:43 UTC) #14
justinlin
Thanks, please take another look. Note that getting rid of GenerateStreamForDevice altogether is a pretty ...
8 years, 2 months ago (2012-10-11 07:17:54 UTC) #15
justinlin
http://codereview.chromium.org/10928043/diff/36001/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): http://codereview.chromium.org/10928043/diff/36001/content/browser/renderer_host/media/video_capture_manager.cc#newcode176 content/browser/renderer_host/media/video_capture_manager.cc:176: vc_device_name.unique_id = "/dev/video1"; On 2012/10/09 11:10:02, perkj wrote: > ...
8 years, 2 months ago (2012-10-11 07:19:21 UTC) #16
perkj_chrome
On 2012/10/10 23:37:43, miu wrote: > Agree with perkj@ on the changes to struct StreamOptions ...
8 years, 2 months ago (2012-10-11 07:52:35 UTC) #17
perkj_chrome
The MediaStreamImpl things start to look good. I realized there is one leak in there. ...
8 years, 2 months ago (2012-10-11 08:01:54 UTC) #18
no longer working on chromium
Hi, sorry for the late review, I have been busy with some M23 bugs. It ...
8 years, 2 months ago (2012-10-11 09:07:24 UTC) #19
justinlin
Thanks for the reviews! Please take another look. http://codereview.chromium.org/10928043/diff/45001/chrome/browser/media/media_internals_observer.h File chrome/browser/media/media_internals_observer.h (right): http://codereview.chromium.org/10928043/diff/45001/chrome/browser/media/media_internals_observer.h#newcode15 chrome/browser/media/media_internals_observer.h:15: virtual ...
8 years, 2 months ago (2012-10-11 19:41:51 UTC) #20
wjia(left Chromium)
https://codereview.chromium.org/10928043/diff/45001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): https://codereview.chromium.org/10928043/diff/45001/content/browser/renderer_host/media/media_stream_manager.cc#newcode135 content/browser/renderer_host/media/media_stream_manager.cc:135: static void UpdateRequestState( I guess you need to call ...
8 years, 2 months ago (2012-10-11 20:21:07 UTC) #21
justinlin
Done, PTAL thanks! https://codereview.chromium.org/10928043/diff/45001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): https://codereview.chromium.org/10928043/diff/45001/content/browser/renderer_host/media/media_stream_manager.cc#newcode135 content/browser/renderer_host/media/media_stream_manager.cc:135: static void UpdateRequestState( On 2012/10/11 20:21:07, ...
8 years, 2 months ago (2012-10-11 21:19:20 UTC) #22
wjia(left Chromium)
Nice. Last round from me, hopefully. :-) https://codereview.chromium.org/10928043/diff/42003/content/browser/renderer_host/media/media_stream_dispatcher_host.cc File content/browser/renderer_host/media/media_stream_dispatcher_host.cc (right): https://codereview.chromium.org/10928043/diff/42003/content/browser/renderer_host/media/media_stream_dispatcher_host.cc#newcode191 content/browser/renderer_host/media/media_stream_dispatcher_host.cc:191: void MediaStreamDispatcherHost::OnGenerateStreamForDevice( ...
8 years, 2 months ago (2012-10-11 22:13:27 UTC) #23
justinlin
thanks again! ptal http://codereview.chromium.org/10928043/diff/42003/content/browser/renderer_host/media/media_stream_dispatcher_host.cc File content/browser/renderer_host/media/media_stream_dispatcher_host.cc (right): http://codereview.chromium.org/10928043/diff/42003/content/browser/renderer_host/media/media_stream_dispatcher_host.cc#newcode191 content/browser/renderer_host/media/media_stream_dispatcher_host.cc:191: void MediaStreamDispatcherHost::OnGenerateStreamForDevice( On 2012/10/11 22:13:27, wjia ...
8 years, 2 months ago (2012-10-12 00:50:22 UTC) #24
miu
lgtm LGTM. BTW--I've been asked in the past to run the following tests/scripts when changing ...
8 years, 2 months ago (2012-10-12 01:10:50 UTC) #25
wjia(left Chromium)
LGTM. Nice work!
8 years, 2 months ago (2012-10-12 01:43:54 UTC) #26
justinlin
Thanks for the instructions for running the tests! Fixed a few things with those. http://codereview.chromium.org/10928043/diff/42003/content/browser/renderer_host/media/media_stream_dispatcher_host.cc ...
8 years, 2 months ago (2012-10-12 03:02:30 UTC) #27
perkj_chrome
lgtm. Please consider remove constructors of StreamOptions that are not used in MediaStreamImpl. http://codereview.chromium.org/10928043/diff/55008/content/common/media/media_stream_options.cc File ...
8 years, 2 months ago (2012-10-12 13:22:04 UTC) #28
no longer working on chromium
Two more nits. lgmt if you address them. http://codereview.chromium.org/10928043/diff/55001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): http://codereview.chromium.org/10928043/diff/55001/content/browser/renderer_host/media/media_stream_manager.cc#newcode148 content/browser/renderer_host/media/media_stream_manager.cc:148: (request->options.video_type ...
8 years, 2 months ago (2012-10-12 14:00:59 UTC) #29
jam
(just looked at content/public which is what I assume you wanted me to look at. ...
8 years, 2 months ago (2012-10-12 17:21:40 UTC) #30
justinlin
Yes, sorry will do that next time. Is it better to ask for public content ...
8 years, 2 months ago (2012-10-12 20:04:20 UTC) #31
jam
lgtm with nit http://codereview.chromium.org/10928043/diff/73001/content/public/browser/media_request_state.h File content/public/browser/media_request_state.h (right): http://codereview.chromium.org/10928043/diff/73001/content/public/browser/media_request_state.h#newcode11 content/public/browser/media_request_state.h:11: REQUEST_STATE_NOT_REQUESTED = 0, nit: sorry I ...
8 years, 2 months ago (2012-10-15 06:38:57 UTC) #32
justinlin
Thanks! http://codereview.chromium.org/10928043/diff/73001/content/public/browser/media_request_state.h File content/public/browser/media_request_state.h (right): http://codereview.chromium.org/10928043/diff/73001/content/public/browser/media_request_state.h#newcode11 content/public/browser/media_request_state.h:11: REQUEST_STATE_NOT_REQUESTED = 0, On 2012/10/15 06:38:57, John Abd-El-Malek ...
8 years, 2 months ago (2012-10-15 14:43:17 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/justinlin@chromium.org/10928043/79003
8 years, 2 months ago (2012-10-15 14:43:34 UTC) #34
commit-bot: I haz the power
Change committed as 161881
8 years, 2 months ago (2012-10-15 17:35:54 UTC) #35
jam
7 years, 10 months ago (2013-02-01 03:10:35 UTC) #36
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/10928043/diff/79003/content/browser/re...
File content/browser/renderer_host/media/media_stream_manager.cc (right):

https://chromiumcodereview.appspot.com/10928043/diff/79003/content/browser/re...
content/browser/renderer_host/media/media_stream_manager.cc:32: const char
kExtensionScheme[] = "chrome-extension";
I just saw this while looking through the code. this a layering violation, since
content shouldn't know about chrome

Powered by Google App Engine
This is Rietveld 408576698