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

Issue 1503563004: Desktop chrome tab capture-chooseDesktopMedia() (Closed)

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

Description

This is the second of three CLs for desktop chrome tab capture. WebRTC today supports media capture and sharing for "screen" and "window" types through Javascript APIs chooseDesktopMedia/GetUserMedia. This Cl adds support for chrome tab for JavaScript API chooseDesktopMedia(). If "tab" is enabled in chooseDesktopMedia(), the desktop media pick dialog will list all chrome tabs for user to select. No tab video/audio will be actually captured until the third CL. The design document can be found at https://goo.gl/uoHnv0 BUG=557222 Committed: https://crrev.com/7194a6fa14a2fea0db9c20602b4a16913d7295f3 Cr-Commit-Position: refs/heads/master@{#369447}

Patch Set 1 #

Total comments: 47

Patch Set 2 : review round 1 #

Total comments: 25

Patch Set 3 : review round2 #

Total comments: 12

Patch Set 4 : review round 3 #

Total comments: 8

Patch Set 5 : review round 4 #

Total comments: 9

Patch Set 6 : review patch 5 #

Total comments: 53

Patch Set 7 : #

Patch Set 8 : rebase #

Total comments: 6

Patch Set 9 : #

Patch Set 10 : #

Total comments: 23

Patch Set 11 : fixed a unit test bug #

Patch Set 12 : #

Patch Set 13 : #

Total comments: 10

Patch Set 14 : #

Total comments: 2

Patch Set 15 : #

Patch Set 16 : #

Total comments: 18

Patch Set 17 : #

Total comments: 4

Patch Set 18 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -147 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 2 chunks +1 line, -1 line 0 comments Download
M content/browser/media/capture/web_contents_audio_input_stream.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
D content/browser/media/capture/web_contents_capture_util.h View 1 1 chunk +0 lines, -32 lines 0 comments Download
D content/browser/media/capture/web_contents_capture_util.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -66 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -6 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -1 line 0 comments Download
M content/browser/renderer_host/media/audio_input_renderer_host.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.cc View 1 2 3 4 5 6 7 3 chunks +2 lines, -2 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M content/public/browser/desktop_media_id.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +14 lines, -29 lines 0 comments Download
M content/public/browser/desktop_media_id.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +37 lines, -1 line 0 comments Download
A content/public/browser/web_contents_media_capture_id.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +62 lines, -0 lines 0 comments Download
A content/public/browser/web_contents_media_capture_id.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +112 lines, -0 lines 0 comments Download

Messages

Total messages: 66 (11 generated)
GeorgeZ
Miguel, Please have a review of this CL before I send it out of our ...
5 years ago (2015-12-04 23:06:22 UTC) #3
GeorgeZ
Qiang, Please have a review of this CL. Thanks, George
5 years ago (2015-12-04 23:08:24 UTC) #5
qiangchen
https://codereview.chromium.org/1503563004/diff/1/chrome/browser/media/desktop_media_list.h File chrome/browser/media/desktop_media_list.h (right): https://codereview.chromium.org/1503563004/diff/1/chrome/browser/media/desktop_media_list.h#newcode66 chrome/browser/media/desktop_media_list.h:66: static gfx::ImageSkia CreateImageEncloseFavicon(gfx::Size size, Better to separate the definition ...
5 years ago (2015-12-07 22:45:56 UTC) #6
miu
https://codereview.chromium.org/1503563004/diff/1/chrome/browser/media/desktop_media_list_ash.cc File chrome/browser/media/desktop_media_list_ash.cc (right): https://codereview.chromium.org/1503563004/diff/1/chrome/browser/media/desktop_media_list_ash.cc#newcode192 chrome/browser/media/desktop_media_list_ash.cc:192: const int kNumTabs = tab_strip_model->count(); naming: This variable is ...
5 years ago (2015-12-08 01:54:38 UTC) #8
GeorgeZ
Qian and Yuri, A patch is uploaded based your reviews. Thanks, George https://codereview.chromium.org/1503563004/diff/1/chrome/browser/media/desktop_media_list.h File chrome/browser/media/desktop_media_list.h ...
5 years ago (2015-12-09 19:36:38 UTC) #9
GeorgeZ
Yuri and Qiang, Please review the new patch based on your comments. Thanks, George
5 years ago (2015-12-11 18:33:54 UTC) #10
miu
Looking much better. A few remaining things: https://codereview.chromium.org/1503563004/diff/20001/chrome/browser/media/desktop_media_list.cc File chrome/browser/media/desktop_media_list.cc (right): https://codereview.chromium.org/1503563004/diff/20001/chrome/browser/media/desktop_media_list.cc#newcode11 chrome/browser/media/desktop_media_list.cc:11: const int ...
5 years ago (2015-12-12 00:00:33 UTC) #11
GeorgeZ
Miu, Updated based on your comments. Thanks, George https://codereview.chromium.org/1503563004/diff/20001/chrome/browser/media/desktop_media_list.cc File chrome/browser/media/desktop_media_list.cc (right): https://codereview.chromium.org/1503563004/diff/20001/chrome/browser/media/desktop_media_list.cc#newcode11 chrome/browser/media/desktop_media_list.cc:11: const ...
5 years ago (2015-12-14 18:33:07 UTC) #12
miu
Just a few things left: https://codereview.chromium.org/1503563004/diff/40001/chrome/browser/media/desktop_media_list.cc File chrome/browser/media/desktop_media_list.cc (right): https://codereview.chromium.org/1503563004/diff/40001/chrome/browser/media/desktop_media_list.cc#newcode41 chrome/browser/media/desktop_media_list.cc:41: const SkImage* temp_image = ...
5 years ago (2015-12-14 20:21:08 UTC) #13
GeorgeZ
Miu, Updated based on your comments. Thanks for a few catches. George https://codereview.chromium.org/1503563004/diff/40001/chrome/browser/media/desktop_media_list.cc File chrome/browser/media/desktop_media_list.cc ...
5 years ago (2015-12-14 21:50:27 UTC) #14
GeorgeZ
Miu, Updated based on your comments. Thanks for a few catches. George
5 years ago (2015-12-14 21:50:29 UTC) #15
GeorgeZ
5 years ago (2015-12-14 23:44:17 UTC) #17
GeorgeZ
rockot, sergeyu, dalecurtis, msw, and mofoltz, Would you please have a review for this CL. ...
5 years ago (2015-12-15 00:02:32 UTC) #19
Ken Rockot(use gerrit already)
https://codereview.chromium.org/1503563004/diff/60001/chrome/common/extensions/docs/examples/api/desktopCapture/app.js File chrome/common/extensions/docs/examples/api/desktopCapture/app.js (right): https://codereview.chromium.org/1503563004/diff/60001/chrome/common/extensions/docs/examples/api/desktopCapture/app.js#newcode7 chrome/common/extensions/docs/examples/api/desktopCapture/app.js:7: const DESKTOP_MEDIA = ['screen', 'window', "tab"]; nit: Please keep ...
5 years ago (2015-12-15 00:06:17 UTC) #20
miu
lgtm % one thing I forgot to mention last time around: https://codereview.chromium.org/1503563004/diff/60001/content/public/browser/web_contents_media_capture_id.h File content/public/browser/web_contents_media_capture_id.h (right): ...
5 years ago (2015-12-15 01:38:53 UTC) #21
DaleCurtis
AIRH and MSM lgtm
5 years ago (2015-12-15 20:23:57 UTC) #22
msw
c/b/ui lgtm with nits. https://codereview.chromium.org/1503563004/diff/60001/chrome/browser/ui/browser_finder.cc File chrome/browser/ui/browser_finder.cc (right): https://codereview.chromium.org/1503563004/diff/60001/chrome/browser/ui/browser_finder.cc#newcode168 chrome/browser/ui/browser_finder.cc:168: if (matches.size()) nit: if (!matches.empty()) ...
5 years ago (2015-12-15 21:30:09 UTC) #23
GeorgeZ
A patch is uploaded based on review comments of miu, rockot and msw. Thanks, George ...
5 years ago (2015-12-16 00:07:39 UTC) #24
GeorgeZ
Sergey and mfoltz, Would you please have a review of this CL. Thanks, George
5 years ago (2015-12-16 20:50:44 UTC) #25
qiangchen
Just a few comments. https://codereview.chromium.org/1503563004/diff/80001/chrome/browser/media/desktop_media_list.cc File chrome/browser/media/desktop_media_list.cc (right): https://codereview.chromium.org/1503563004/diff/80001/chrome/browser/media/desktop_media_list.cc#newcode43 chrome/browser/media/desktop_media_list.cc:43: delete temp_image; Consider using scoped_ptr ...
5 years ago (2015-12-16 21:08:36 UTC) #26
GeorgeZ
Qiang, A patch is uploaded based on your review comments. Thanks, George https://codereview.chromium.org/1503563004/diff/80001/chrome/browser/media/desktop_media_list.cc File chrome/browser/media/desktop_media_list.cc ...
5 years ago (2015-12-16 22:38:40 UTC) #27
qiangchen
On 2015/12/16 22:38:40, GeorgeZ wrote: > Qiang, > > A patch is uploaded based on ...
5 years ago (2015-12-17 17:43:36 UTC) #28
GeorgeZ
Sergey and mfoltz, Would you please have a review of this CL. Ken, Is JavaScript ...
5 years ago (2015-12-18 16:01:54 UTC) #29
Ken Rockot(use gerrit already)
JS change lgtm
5 years ago (2015-12-18 16:21:31 UTC) #30
Sergey Ulanov
It looks like you can split this CL into multiple CLs. At very list changes ...
5 years ago (2015-12-18 19:45:05 UTC) #31
GeorgeZ
Sergey, This CL used to contain half of current files. A reviewer's comment of moving ...
5 years ago (2015-12-18 21:57:26 UTC) #32
GeorgeZ
Sergey, I added one more comment about the code duplication. Let me know your opinion. ...
5 years ago (2015-12-21 16:17:37 UTC) #33
GeorgeZ
Sergey and mfoltz, Would you please give some feedback for this CL. Thanks, George
4 years, 11 months ago (2016-01-04 18:07:17 UTC) #34
Sergey Ulanov
My objections have to do mainly with NativeDesktopMediaList and DesktopMediaListAsh. So to make further progress ...
4 years, 11 months ago (2016-01-04 18:59:29 UTC) #35
Sergey Ulanov
So here is proof-of-concept implementation of CombinedDesktopMediaList: https://codereview.chromium.org/1554243002/ As you can see the code is ...
4 years, 11 months ago (2016-01-04 19:43:48 UTC) #36
mark a. foltz
This feature seems to largely duplicate what is possible through chrome.tabCapture with the additional feature ...
4 years, 11 months ago (2016-01-04 20:11:41 UTC) #37
miu
https://codereview.chromium.org/1503563004/diff/100001/content/public/browser/web_contents_media_capture_id.h File content/public/browser/web_contents_media_capture_id.h (right): https://codereview.chromium.org/1503563004/diff/100001/content/public/browser/web_contents_media_capture_id.h#newcode15 content/public/browser/web_contents_media_capture_id.h:15: struct CONTENT_EXPORT WebContentsMediaCaptureId { On 2016/01/04 20:11:41, mfoltz_OOO_until_1.4 wrote: ...
4 years, 11 months ago (2016-01-05 01:43:09 UTC) #38
GeorgeZ
Sergey and Mark, I updated the code based on your comments. I would like use ...
4 years, 11 months ago (2016-01-06 22:41:39 UTC) #39
GeorgeZ
Avi, As an owner, would you please have a review of content/browser/web_contents/web_contents_impl.cc content/public/browser/web_contents_observer.h content/public/browser/desktop_media_id.h content/public/browser/desktop_media_id.cc ...
4 years, 11 months ago (2016-01-06 22:46:02 UTC) #41
Avi (use Gerrit)
Two massive objections here. 1. Your UI strings are abysmal. I would withhold LG on ...
4 years, 11 months ago (2016-01-07 01:22:34 UTC) #42
GeorgeZ
Avi, For your point 1, I modified the string for tab title display to follow ...
4 years, 11 months ago (2016-01-07 22:35:31 UTC) #43
Avi (use Gerrit)
https://codereview.chromium.org/1503563004/diff/180001/chrome/browser/media/desktop_media_list.h File chrome/browser/media/desktop_media_list.h (right): https://codereview.chromium.org/1503563004/diff/180001/chrome/browser/media/desktop_media_list.h#newcode67 chrome/browser/media/desktop_media_list.h:67: class MediaListWebContentsObserver : public content::WebContentsObserver { This is not ...
4 years, 11 months ago (2016-01-08 17:11:39 UTC) #44
GeorgeZ
Avi, Thanks for your pointing out some key issues. I uploaded patches to address your ...
4 years, 11 months ago (2016-01-08 19:39:03 UTC) #45
miu
https://codereview.chromium.org/1503563004/diff/180001/content/public/browser/desktop_media_id.h File content/public/browser/desktop_media_id.h (right): https://codereview.chromium.org/1503563004/diff/180001/content/public/browser/desktop_media_id.h#newcode26 content/public/browser/desktop_media_id.h:26: enum Type { TYPE_NONE, TYPE_SCREEN, TYPE_WINDOW, TYPE_TAB }; On ...
4 years, 11 months ago (2016-01-08 19:49:56 UTC) #46
GeorgeZ
Sergey, Would you please provide some feedback of new patches. Thanks, George
4 years, 11 months ago (2016-01-08 20:10:04 UTC) #47
Avi (use Gerrit)
No major issues, just minor ones now. Thanks. https://codereview.chromium.org/1503563004/diff/240001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/1503563004/diff/240001/chrome/app/generated_resources.grd#newcode6111 chrome/app/generated_resources.grd:6111: + ...
4 years, 11 months ago (2016-01-11 16:27:57 UTC) #48
GeorgeZ
Avi, I uploaded a patch based on your comments. Thanks, George https://codereview.chromium.org/1503563004/diff/240001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): ...
4 years, 11 months ago (2016-01-11 19:16:19 UTC) #49
Avi (use Gerrit)
LGTM Thanks!
4 years, 11 months ago (2016-01-11 19:20:12 UTC) #50
GeorgeZ
Sergey, I would need your review and approve to land this CL. Thanks, George
4 years, 11 months ago (2016-01-12 00:15:13 UTC) #51
Sergey Ulanov
On 2016/01/12 00:15:13, GeorgeZ wrote: > Sergey, > > I would need your review and ...
4 years, 11 months ago (2016-01-12 21:35:48 UTC) #52
miu
lgtm % nit: https://codereview.chromium.org/1503563004/diff/260001/content/public/browser/desktop_media_id.cc File content/public/browser/desktop_media_id.cc (right): https://codereview.chromium.org/1503563004/diff/260001/content/public/browser/desktop_media_id.cc#newcode124 content/public/browser/desktop_media_id.cc:124: // for no WebContentsand aura: screen:"window_id" ...
4 years, 11 months ago (2016-01-12 22:05:03 UTC) #53
GeorgeZ
Sergey, I Reverted all changes associated DesktopMediaList classes as you suggested. Thanks, George https://codereview.chromium.org/1503563004/diff/260001/content/public/browser/desktop_media_id.cc File ...
4 years, 11 months ago (2016-01-13 17:51:07 UTC) #54
Sergey Ulanov
https://codereview.chromium.org/1503563004/diff/300001/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc File chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc (right): https://codereview.chromium.org/1503563004/diff/300001/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc#newcode95 chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc:95: show_tabs = true; tab capture is still not implemented ...
4 years, 11 months ago (2016-01-13 19:06:11 UTC) #55
GeorgeZ
Sergey, I added a patch to address your comments. Thanks, George https://codereview.chromium.org/1503563004/diff/300001/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc File chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc (right): ...
4 years, 11 months ago (2016-01-13 22:29:02 UTC) #56
Sergey Ulanov
lgtm https://codereview.chromium.org/1503563004/diff/320001/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc File chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc (right): https://codereview.chromium.org/1503563004/diff/320001/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc#newcode79 chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc:79: bool show_tabs = false; remove this. You don't ...
4 years, 11 months ago (2016-01-13 22:53:16 UTC) #57
GeorgeZ
Sergey. Done and thanks, George https://codereview.chromium.org/1503563004/diff/320001/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc File chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc (right): https://codereview.chromium.org/1503563004/diff/320001/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc#newcode79 chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc:79: bool show_tabs = false; ...
4 years, 11 months ago (2016-01-13 23:15:53 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1503563004/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1503563004/340001
4 years, 11 months ago (2016-01-14 17:26:48 UTC) #61
commit-bot: I haz the power
Committed patchset #18 (id:340001)
4 years, 11 months ago (2016-01-14 17:33:53 UTC) #63
commit-bot: I haz the power
Patchset 18 (id:??) landed as https://crrev.com/7194a6fa14a2fea0db9c20602b4a16913d7295f3 Cr-Commit-Position: refs/heads/master@{#369447}
4 years, 11 months ago (2016-01-14 17:34:49 UTC) #65
qiangchen
4 years, 11 months ago (2016-01-14 23:17:11 UTC) #66
Message was sent while issue was closed.
lgtm

https://codereview.chromium.org/1503563004/diff/80001/content/browser/media/c...
File content/browser/media/capture/web_contents_video_capture_device_unittest.cc
(right):

https://codereview.chromium.org/1503563004/diff/80001/content/browser/media/c...
content/browser/media/capture/web_contents_video_capture_device_unittest.cc:22:
#include "content/public/browser/web_contents_media_capture_id.h"
On 2015/12/16 22:38:40, GeorgeZ wrote:
> On 2015/12/16 21:08:36, qiangchenC wrote:
> > I did not see any essential code change in this file. Can you verify whether
> we
> > can remove this include or not?
> 
> content/public/browser/web_contents_media_capture_id.h was added to cover the
> content of content/browser/media/capture/web_contents_capture_util.h. This was
> suggested by a reviewer.

Acknowledged.

Powered by Google App Engine
This is Rietveld 408576698