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

Issue 1221483002: New tabCapture.captureOffscreenTab API, initially for Presentation API 1UA mode (Closed)

Created:
5 years, 6 months ago by miu
Modified:
5 years, 2 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, asvitkine+watch_chromium.org, miu+watch_chromium.org, Kevin M, Jeffrey Yasskin
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

New tabCapture.captureOffscreenTab API, initially for Presentation API 1UA mode This is the second in a 2-part change to support the one user agent (1UA) mode for the new W3C Presentation API. This part adds a new chrome.tabCapture.captureOffscreenTab API that spawns off-screen tabs and captures their content into MediaStreams for transport to a remote display. This change includes some refactoring of code common to this new API and the existing tabCapture.capture API. In addition, the concept of "anonymous" tab capture requests has been added to TabCaptureRegistry, to explicitly make the off-screen tabs invisible to other extensions APIs (this is by design). At this time, the new API is only available on the Canary and Dev channels, and to certain whitelisted extensions. BUG=490890, 537732 Committed: https://crrev.com/b7e17a44a8bc21255a2f4993a549bccf8cca93d4 Cr-Commit-Position: refs/heads/master@{#352144}

Patch Set 1 #

Total comments: 8

Patch Set 2 : kmarshall's comments addressed, plus REBASE. #

Patch Set 3 : Revived and refreshed after API proposal process. Moar tests. #

Total comments: 15

Patch Set 4 : Remove |id| arg, and REBASE. #

Patch Set 5 : Revert to only whitelisted extension use. #

Total comments: 6

Patch Set 6 : todo for whitelist location, rewrote max_offscreen_tabs.js, and logic fix in tab_capture_registry.cc #

Total comments: 6

Patch Set 7 : Register off-screen tabs as presentations via separate private API. #

Total comments: 8

Patch Set 8 : Mostly revert to Patch Set 6, plus minor tweaks. [and REBASE] #

Unified diffs Side-by-side diffs Delta from patch set Stats (+877 lines, -124 lines) Patch
M chrome/browser/extensions/api/tab_capture/offscreen_presentation.h View 1 2 3 4 5 6 7 4 chunks +11 lines, -11 lines 0 comments Download
M chrome/browser/extensions/api/tab_capture/offscreen_presentation.cc View 1 2 3 4 5 6 7 4 chunks +18 lines, -31 lines 0 comments Download
M chrome/browser/extensions/api/tab_capture/tab_capture_api.h View 1 2 7 2 chunks +23 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/tab_capture/tab_capture_api.cc View 1 2 3 4 5 6 7 8 chunks +209 lines, -61 lines 0 comments Download
M chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc View 1 2 4 3 chunks +101 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/tab_capture/tab_capture_registry.h View 1 chunk +9 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc View 1 2 3 4 5 7 chunks +20 lines, -9 lines 0 comments Download
M chrome/common/extensions/api/tab_capture.idl View 1 2 3 7 2 chunks +28 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/tab_capture_custom_bindings.js View 1 2 7 2 chunks +8 lines, -4 lines 0 comments Download
M chrome/test/data/extensions/api_test/tab_capture/api_tests.js View 1 2 3 7 2 chunks +47 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/tab_capture/max_offscreen_tabs.html View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/tab_capture/max_offscreen_tabs.js View 1 2 3 4 5 1 chunk +45 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/tab_capture/offscreen_end_to_end.html View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/tab_capture/offscreen_end_to_end.js View 1 2 3 1 chunk +64 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/tab_capture/offscreen_evil_tests.html View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/tab_capture/offscreen_evil_tests.js View 1 2 3 1 chunk +85 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/tab_capture/offscreen_test_harness.js View 1 2 1 chunk +188 lines, -0 lines 0 comments Download
M extensions/browser/extension_function_histogram_value.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 41 (10 generated)
miu
Kevin, PTAL.
5 years, 6 months ago (2015-06-26 20:12:24 UTC) #2
Kevin M
https://codereview.chromium.org/1221483002/diff/1/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc File chrome/browser/extensions/api/tab_capture/tab_capture_api.cc (right): https://codereview.chromium.org/1221483002/diff/1/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc#newcode88 chrome/browser/extensions/api/tab_capture/tab_capture_api.cc:88: if (options->audio.get() && *options->audio.get()) { .get() isn't needed here ...
5 years, 5 months ago (2015-06-29 22:17:02 UTC) #3
miu
PTAL. Addressed comments: https://codereview.chromium.org/1221483002/diff/1/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc File chrome/browser/extensions/api/tab_capture/tab_capture_api.cc (right): https://codereview.chromium.org/1221483002/diff/1/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc#newcode88 chrome/browser/extensions/api/tab_capture/tab_capture_api.cc:88: if (options->audio.get() && *options->audio.get()) { On ...
5 years, 5 months ago (2015-06-30 04:09:59 UTC) #4
Kevin M
lgtm
5 years, 5 months ago (2015-06-30 16:58:25 UTC) #5
miu
jyasskin: OWNERS approval for chrome/common/extensions/api/tab_capture.idl mpearson: OWNERS approval for *histogram* (last 2 files)
5 years, 5 months ago (2015-06-30 20:01:35 UTC) #7
miu
isherman (instead of mpearson): OWNERS approval for *histogram* (last 2 files)
5 years, 5 months ago (2015-06-30 20:02:47 UTC) #9
Mark P
histograms.xml lgtm
5 years, 5 months ago (2015-06-30 23:00:19 UTC) #11
miu
(Removing isherman@ since mpearson@ approved.)
5 years, 5 months ago (2015-06-30 23:10:19 UTC) #13
Jeffrey Yasskin
As a new function in a Chrome Apps/Extensions API, this needs to go through API ...
5 years, 5 months ago (2015-07-06 20:19:28 UTC) #14
miu
I've revived this, aiming to land in time for M47 branch. I am switching the ...
5 years, 3 months ago (2015-09-25 00:10:11 UTC) #15
miu
imcheng: PTAL. kalman: OWNERS review, please. This change adds the API publicly, but only whitelisted ...
5 years, 3 months ago (2015-09-25 00:14:43 UTC) #17
not at google - send to devlin
https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl File chrome/common/extensions/api/tab_capture.idl (right): https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl#newcode71 chrome/common/extensions/api/tab_capture.idl:71: // |startUrl| and |id|. When created, the off-screen tab ...
5 years, 2 months ago (2015-09-25 16:56:03 UTC) #18
miu
https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl File chrome/common/extensions/api/tab_capture.idl (right): https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl#newcode71 chrome/common/extensions/api/tab_capture.idl:71: // |startUrl| and |id|. When created, the off-screen tab ...
5 years, 2 months ago (2015-09-25 17:35:32 UTC) #19
not at google - send to devlin
https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl File chrome/common/extensions/api/tab_capture.idl (right): https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl#newcode71 chrome/common/extensions/api/tab_capture.idl:71: // |startUrl| and |id|. When created, the off-screen tab ...
5 years, 2 months ago (2015-09-25 17:42:05 UTC) #20
miu
https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl File chrome/common/extensions/api/tab_capture.idl (right): https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl#newcode71 chrome/common/extensions/api/tab_capture.idl:71: // |startUrl| and |id|. When created, the off-screen tab ...
5 years, 2 months ago (2015-09-25 18:47:54 UTC) #21
not at google - send to devlin
https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl File chrome/common/extensions/api/tab_capture.idl (right): https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl#newcode71 chrome/common/extensions/api/tab_capture.idl:71: // |startUrl| and |id|. When created, the off-screen tab ...
5 years, 2 months ago (2015-09-25 19:13:25 UTC) #22
miu
https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl File chrome/common/extensions/api/tab_capture.idl (right): https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl#newcode71 chrome/common/extensions/api/tab_capture.idl:71: // |startUrl| and |id|. When created, the off-screen tab ...
5 years, 2 months ago (2015-09-25 21:59:18 UTC) #23
not at google - send to devlin
https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl File chrome/common/extensions/api/tab_capture.idl (right): https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl#newcode71 chrome/common/extensions/api/tab_capture.idl:71: // |startUrl| and |id|. When created, the off-screen tab ...
5 years, 2 months ago (2015-09-25 22:29:55 UTC) #24
miu
https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl File chrome/common/extensions/api/tab_capture.idl (right): https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl#newcode71 chrome/common/extensions/api/tab_capture.idl:71: // |startUrl| and |id|. When created, the off-screen tab ...
5 years, 2 months ago (2015-09-26 20:40:14 UTC) #25
miu
jyasskin: Can you take over the OWNER part of this review (kalman@ is away). We ...
5 years, 2 months ago (2015-09-28 22:38:09 UTC) #27
imcheng
lgtm https://codereview.chromium.org/1221483002/diff/80001/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc File chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc (right): https://codereview.chromium.org/1221483002/diff/80001/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc#newcode176 chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc:176: return; Did you mean continue; here? https://codereview.chromium.org/1221483002/diff/80001/chrome/test/data/extensions/api_test/tab_capture/max_offscreen_tabs.js File ...
5 years, 2 months ago (2015-09-29 01:28:56 UTC) #28
not at google - send to devlin
-jyasskin +devlin (who is taking over my reviews) though I will try to finish this ...
5 years, 2 months ago (2015-09-30 01:32:11 UTC) #30
miu
kalman: Addressed your comments, PTAL. https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl File chrome/common/extensions/api/tab_capture.idl (right): https://codereview.chromium.org/1221483002/diff/40001/chrome/common/extensions/api/tab_capture.idl#newcode71 chrome/common/extensions/api/tab_capture.idl:71: // |startUrl| and |id|. ...
5 years, 2 months ago (2015-09-30 19:46:39 UTC) #31
not at google - send to devlin
https://chromiumcodereview.appspot.com/1221483002/diff/100001/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc File chrome/browser/extensions/api/tab_capture/tab_capture_api.cc (right): https://chromiumcodereview.appspot.com/1221483002/diff/100001/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc#newcode241 chrome/browser/extensions/api/tab_capture/tab_capture_api.cc:241: // http://crbug.com/537732 I don't understand your comment. This is ...
5 years, 2 months ago (2015-10-01 00:09:14 UTC) #32
not at google - send to devlin
On 2015/10/01 00:09:14, kalman is away wrote: > https://chromiumcodereview.appspot.com/1221483002/diff/100001/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc > File chrome/browser/extensions/api/tab_capture/tab_capture_api.cc (right): > > ...
5 years, 2 months ago (2015-10-01 00:11:26 UTC) #33
miu
kalman: Responded to your comments, and Patch Set 7 is an alternative way to register ...
5 years, 2 months ago (2015-10-01 22:34:46 UTC) #34
not at google - send to devlin
Ok... got it. So it's important to be able to reconnect back to an existing ...
5 years, 2 months ago (2015-10-02 01:17:26 UTC) #35
miu
Thanks for the review! :) Responses to last round: https://codereview.chromium.org/1221483002/diff/100001/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc File chrome/browser/extensions/api/tab_capture/tab_capture_api.cc (right): https://codereview.chromium.org/1221483002/diff/100001/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc#newcode241 chrome/browser/extensions/api/tab_capture/tab_capture_api.cc:241: ...
5 years, 2 months ago (2015-10-02 18:58:21 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1221483002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1221483002/140001
5 years, 2 months ago (2015-10-02 19:01:37 UTC) #39
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 2 months ago (2015-10-02 21:52:28 UTC) #40
commit-bot: I haz the power
5 years, 2 months ago (2015-10-02 21:53:31 UTC) #41
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/b7e17a44a8bc21255a2f4993a549bccf8cca93d4
Cr-Commit-Position: refs/heads/master@{#352144}

Powered by Google App Engine
This is Rietveld 408576698