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

Issue 1314413005: [Presentation API] 1-UA presentation support + presenter APIs. (Closed)

Created:
5 years, 3 months ago by imcheng
Modified:
4 years ago
Reviewers:
mark a. foltz, whywhat, miu
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, extensions-reviews_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, media-router+watch_chromium.org, miu+watch_chromium.org, posciak+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, wjia+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Presentation API] 1-UA presentation support + presenter APIs. This patch implements the 1-UA mode support according to the doc I sent out a while ago. Contains the following major components: - OffscreenPresentationManager - browser context keyed service to connect the controller and receiver sides of an 1-ua presentation. Instance is shared with incognito browser contexts to allow communication with the offscreen tab. - ReceiverPresentationServiceDelegateImpl - receiver-side implementation of PresentationServiceDelegate, only available to offscreen tabs. Talks to OffscreenPresentationManager. - PresentationServiceDelegateImpl - modified logic to maintain controller side of offscreen presentations and redirect incoming messages, as well as listen for messages / state changes from the receiver side. TODO: - Need additional identifier for PresentationSessionInfo objects. Current proposal is to use RFH ID and limit 1 PresentationSession per presentation ID per frame. Until then we can't really have multiple controllers / getSessions(). BUG=513859

Patch Set 1 #

Total comments: 50

Patch Set 2 : Addressed comments #

Patch Set 3 : #

Total comments: 32

Patch Set 4 : Addressed Yuri's comments; rework of the OffscreenPresentationManager interface #

Total comments: 66

Patch Set 5 : Addressed mfoltz's comments rebase (forgot to upload as separate patchsets, sorry) #

Total comments: 2

Patch Set 6 : Rebase again to pick up Yuri's cl #

Total comments: 48

Patch Set 7 : addressed yuri's comments #16 #

Total comments: 80

Patch Set 8 : Addressed comments #18-21 #

Total comments: 12

Patch Set 9 : Compiles, but still need to address todos #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : Rename + api change to align with spec #

Patch Set 13 : Added tests #

Patch Set 14 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1927 lines, -105 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/tab_capture/offscreen_tab.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/media/router/create_presentation_connection_request.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/media/router/create_presentation_connection_request.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/media/router/create_presentation_connection_request_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/media/router/media_route.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/media/router/media_route.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/media/router/media_router.gypi View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/media/router/mojo/media_router.mojom View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/media/router/mojo/media_router_type_converters.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/media/router/mojo/media_router_type_converters_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +4 lines, -0 lines 0 comments Download
A chrome/browser/media/router/offscreen_presentation_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +264 lines, -0 lines 0 comments Download
A chrome/browser/media/router/offscreen_presentation_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +238 lines, -0 lines 0 comments Download
A chrome/browser/media/router/offscreen_presentation_manager_factory.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +43 lines, -0 lines 0 comments Download
A chrome/browser/media/router/offscreen_presentation_manager_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +46 lines, -0 lines 0 comments Download
A chrome/browser/media/router/offscreen_presentation_manager_factory_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +50 lines, -0 lines 0 comments Download
A chrome/browser/media/router/offscreen_presentation_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +241 lines, -0 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 29 chunks +201 lines, -68 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 11 chunks +216 lines, -9 lines 0 comments Download
A chrome/browser/media/router/receiver_presentation_service_delegate_impl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +153 lines, -0 lines 0 comments Download
A chrome/browser/media/router/receiver_presentation_service_delegate_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +293 lines, -0 lines 0 comments Download
M chrome/browser/media/router/test_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +18 lines, -0 lines 0 comments Download
M chrome/browser/media/router/test_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/presentation/presentation_service_impl.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +7 lines, -0 lines 0 comments Download
M content/browser/presentation/presentation_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +26 lines, -1 line 0 comments Download
M content/browser/presentation/presentation_service_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +35 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M content/public/browser/presentation_service_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +10 lines, -2 lines 0 comments Download
M content/public/browser/presentation_session.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -0 lines 0 comments Download
M extensions/renderer/resources/media_router_bindings.js View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/public/platform/modules/presentation/presentation.mojom View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (5 generated)
imcheng
Reviewers: PTAL. High level feedbacks are appreciated. Note that between the regular and incognito implementations ...
5 years, 3 months ago (2015-09-10 22:39:35 UTC) #2
mark a. foltz
Several comments inline, high level: 1. It would be cleaner to identify the route as ...
5 years, 3 months ago (2015-09-11 23:24:20 UTC) #3
whywhat
Will take another look once Mark's comments are addressed. https://codereview.chromium.org/1314413005/diff/1/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/1314413005/diff/1/chrome/browser/chrome_content_browser_client.cc#newcode2560 chrome/browser/chrome_content_browser_client.cc:2560: ...
5 years, 3 months ago (2015-09-14 15:20:40 UTC) #4
miu
On the whole, I wouldn't use the "1UA" phrase everywhere as it isn't very meaningful ...
5 years, 3 months ago (2015-09-17 00:09:20 UTC) #5
miu
Oh, and BTW, I will be resuming work on https://codereview.chromium.org/1221483002/ next week so we'll very ...
5 years, 3 months ago (2015-09-17 00:11:58 UTC) #6
imcheng
Addressed comments, PTAL. There are some large changes in the new patchset, so here's a ...
5 years, 2 months ago (2015-09-26 01:21:57 UTC) #7
miu
IMO, the refactoring for PS3 is over-engineered. Three main general points: 1. Adding layers of ...
5 years, 2 months ago (2015-09-27 00:22:09 UTC) #8
imcheng
Thanks for the feedback Yuri. Reading the code again I do agree the many of ...
5 years, 2 months ago (2015-09-28 17:28:37 UTC) #9
imcheng
PTAL. Sorry it took so long. Based on the feedback (which was very useful), I ...
5 years, 2 months ago (2015-09-30 01:13:42 UTC) #11
mark a. foltz
One round of review comments focused on the modified, not the new files. Mostly minor ...
5 years, 2 months ago (2015-10-01 06:25:29 UTC) #12
mark a. foltz
I was able to take a look at everything except the receiver_presentation_service_delgate files before I ...
5 years, 2 months ago (2015-10-01 18:39:13 UTC) #13
imcheng
PTAL https://codereview.chromium.org/1314413005/diff/80001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/1314413005/diff/80001/chrome/browser/chrome_content_browser_client.cc#newcode2559 chrome/browser/chrome_content_browser_client.cc:2559: if (web_contents->GetBrowserContext()->IsOffTheRecord()) { On 2015/10/01 06:25:28, mark a. ...
5 years, 2 months ago (2015-10-06 00:59:15 UTC) #14
whywhat
https://codereview.chromium.org/1314413005/diff/100001/content/browser/presentation/presentation_service_impl.h File content/browser/presentation/presentation_service_impl.h (right): https://codereview.chromium.org/1314413005/diff/100001/content/browser/presentation/presentation_service_impl.h#newcode101 content/browser/presentation/presentation_service_impl.h:101: using PresentationSessionMojoCallback = nit: Could this rename be done ...
5 years, 2 months ago (2015-10-07 13:25:54 UTC) #15
miu
The refactoring made things much cleaner. Most of my comments this round are about impl ...
5 years, 2 months ago (2015-10-07 21:51:47 UTC) #16
imcheng
https://codereview.chromium.org/1314413005/diff/120001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/1314413005/diff/120001/chrome/browser/chrome_content_browser_client.cc#newcode2600 chrome/browser/chrome_content_browser_client.cc:2600: return media_router::ReceiverPresentationServiceDelegateImpl:: On 2015/10/07 21:51:46, miu wrote: > This ...
5 years, 2 months ago (2015-10-10 04:39:44 UTC) #17
mark a. foltz
LGTM with comments applied. This seems pretty solid and thanks for the detailed comments in ...
5 years, 2 months ago (2015-10-12 21:56:10 UTC) #18
whywhat
Also the previous comment about the rename of Callback typeded. https://codereview.chromium.org/1314413005/diff/140001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/1314413005/diff/140001/chrome/browser/chrome_content_browser_client.cc#newcode2610 ...
5 years, 2 months ago (2015-10-13 15:21:31 UTC) #19
whywhat
Also the previous comment about the rename of Callback typeded.
5 years, 2 months ago (2015-10-13 15:21:32 UTC) #20
miu
A few little things left (other reviewer's comments seemed to cover the rest of my ...
5 years, 2 months ago (2015-10-14 01:54:57 UTC) #21
imcheng
Regarding mfoltz's comment 2, I looked into merging the two PresentationServiceDelegate implementations. The idea is ...
5 years, 2 months ago (2015-10-17 01:00:24 UTC) #22
whywhat
lgtm
5 years, 2 months ago (2015-10-19 08:50:06 UTC) #23
miu
More minor things in Patch Set 8: https://codereview.chromium.org/1314413005/diff/160001/chrome/browser/media/router/offscreen_presentation_manager.cc File chrome/browser/media/router/offscreen_presentation_manager.cc (right): https://codereview.chromium.org/1314413005/diff/160001/chrome/browser/media/router/offscreen_presentation_manager.cc#newcode196 chrome/browser/media/router/offscreen_presentation_manager.cc:196: LOG(ERROR) << ...
5 years, 2 months ago (2015-10-20 00:56:50 UTC) #24
miu
Was this change abandoned? If so, please close it.
4 years, 6 months ago (2016-06-07 21:15:25 UTC) #25
imcheng
I have just started rebasing this patch (tons of merge conflicts). I will upload a ...
4 years, 6 months ago (2016-06-07 21:19:37 UTC) #26
imcheng
I have rebased and brought the API support to align with the latest spec. Next ...
4 years, 6 months ago (2016-06-10 00:31:32 UTC) #27
imcheng
Rebased, updated the patch according to current specs, and added tests. You can view the ...
4 years, 6 months ago (2016-06-13 22:30:02 UTC) #31
mark a. foltz
4 years ago (2016-12-13 23:42:12 UTC) #32
[end of year cleanup]

I think we're not planning on landing this, correct?  Can this issue be closed
now?

Powered by Google App Engine
This is Rietveld 408576698