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

Issue 979413002: [Presentation API] Additional plumbing for PresentationServiceImpl. (Closed)

Created:
5 years, 9 months ago by imcheng (use chromium acct)
Modified:
5 years, 9 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@REAL-NEW-MASTER
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Presentation API] Additional plumbing for PresentationServiceImpl. Implemented PSImpl::OnScreenAvailabilityListenerRemoved() by hooking it up to PSDelegate. Added the following functions to the PSDelegate interface: (1) SetDefaultPresentationUrl (2) StartSession (3) JoinSession Implemented (1), (2), (3) in PSImpl. For (1), PSImpl contains logic to "transfer the callback" -- that is, if default presentation URL changes after a device availability listener was added, the listener will continue receiving device updates for the new default presentation URL. Note that because (2) and (3) takes callbacks back into PSImpl, and that it could be possible for PSImpl to have been destroyed at the time of callback invocation, the callbacks are bound using WeakPtr<PsImpl>. Added C++ data types in content/public/browser that corresponds to PresentationSessionInfo/PresentationError in mojom. Added mojo converter templates + tests. Also removed the PresentationSession field from PresentationSessionInfo as PresentationSession is a mojo interface. It's done to separate data structs from interfaces. BUG=459001 Committed: https://crrev.com/271b9ef3cc86d5c038ff97b3a28ab437eeacbcc3 Cr-Commit-Position: refs/heads/master@{#321195}

Patch Set 1 #

Patch Set 2 : Added DoSetDefaultPresentationUrl() #

Patch Set 3 : Added type converters, plumbed StartSession/JoinSession (need tests) #

Patch Set 4 : Added unit tests #

Patch Set 5 : updated comments #

Total comments: 34

Patch Set 6 : Addressed Anton's comments #

Patch Set 7 : Rebase #

Total comments: 16

Patch Set 8 : Addressed comments, more to come (handle overlapping requests, default pres id) #

Patch Set 9 : Added handling for overlapping requests, default presentation id, 1-UA fallback #

Total comments: 31

Patch Set 10 : Addressed comments #

Patch Set 11 : Rebase #

Patch Set 12 : Added session_id #

Patch Set 13 : Revert session_id for now #

Patch Set 14 : Add missing CONTENT_EXPORTs #

Patch Set 15 : Get rid of RunLoopUntilIdle #

Total comments: 20

Patch Set 16 : Addressed mark's comments #

Patch Set 17 : rm presentation_session.mojom #

Unified diffs Side-by-side diffs Delta from patch set Stats (+893 lines, -144 lines) Patch
M content/browser/presentation/presentation_service_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +115 lines, -46 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 13 14 15 8 chunks +206 lines, -56 lines 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 13 14 11 chunks +293 lines, -14 lines 0 comments Download
A content/browser/presentation/presentation_type_converters.h View 1 2 3 12 1 chunk +50 lines, -0 lines 0 comments Download
A content/browser/presentation/presentation_type_converters.cc View 1 2 3 1 chunk +29 lines, -0 lines 0 comments Download
A content/browser/presentation/presentation_type_converters_unittest.cc View 1 2 3 12 1 chunk +34 lines, -0 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 1 chunk +0 lines, -1 line 0 comments Download
M content/common/presentation/presentation_service.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +4 lines, -6 lines 0 comments Download
M content/common/presentation/presentation_session.mojom View 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 1 chunk +0 lines, -8 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -0 lines 0 comments Download
M content/content_common_mojo_bindings.gyp View 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 1 chunk +0 lines, -1 line 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/public/browser/presentation_screen_availability_listener.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -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 12 13 14 15 3 chunks +59 lines, -3 lines 0 comments Download
A content/public/browser/presentation_session.h View 1 2 12 1 chunk +45 lines, -0 lines 0 comments Download
A content/public/browser/presentation_session.cc View 1 2 12 1 chunk +30 lines, -0 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +10 lines, -4 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +11 lines, -5 lines 0 comments Download

Messages

Total messages: 29 (5 generated)
imcheng
Hi Avi, you helped review content/public/browser interfaces for Presentation API before. I would appreciate it ...
5 years, 9 months ago (2015-03-10 00:03:46 UTC) #3
Avi (use Gerrit)
API LGTM
5 years, 9 months ago (2015-03-10 00:36:56 UTC) #4
whywhat
https://codereview.chromium.org/979413002/diff/100001/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/979413002/diff/100001/content/browser/presentation/presentation_service_impl.cc#newcode76 content/browser/presentation/presentation_service_impl.cc:76: // Presentation URL. BTW, are we going to support ...
5 years, 9 months ago (2015-03-10 17:05:05 UTC) #5
imcheng
https://codereview.chromium.org/979413002/diff/100001/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/979413002/diff/100001/content/browser/presentation/presentation_service_impl.cc#newcode76 content/browser/presentation/presentation_service_impl.cc:76: // Presentation URL. On 2015/03/10 17:05:04, whywhat wrote: > ...
5 years, 9 months ago (2015-03-10 18:31:16 UTC) #6
whywhat
https://codereview.chromium.org/979413002/diff/100001/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/979413002/diff/100001/content/browser/presentation/presentation_service_impl.cc#newcode76 content/browser/presentation/presentation_service_impl.cc:76: // Presentation URL. On 2015/03/10 18:31:15, imcheng1 wrote: > ...
5 years, 9 months ago (2015-03-10 23:20:23 UTC) #7
whywhat
5 years, 9 months ago (2015-03-10 23:20:24 UTC) #8
mark a. foltz
A few initial comments - I will want to take another look. Is there any ...
5 years, 9 months ago (2015-03-11 01:08:19 UTC) #9
mark a. foltz
The tracking of state for each presentation URL seems a little complex. Would a simpler ...
5 years, 9 months ago (2015-03-11 23:55:57 UTC) #10
imcheng
Thanks for the reviews. I have left a question in the comments regarding the behavior ...
5 years, 9 months ago (2015-03-12 20:03:41 UTC) #11
imcheng
Updated the patch. - Added handling of overlapping Start/JoinSession requests. For StartSession we will queue ...
5 years, 9 months ago (2015-03-12 23:24:29 UTC) #13
mark a. foltz
lgtm Your explanation makes sense but I would like a short whiteboard session to visualize ...
5 years, 9 months ago (2015-03-13 01:39:13 UTC) #14
whywhat
https://codereview.chromium.org/979413002/diff/100001/content/common/presentation/presentation_service.mojom File content/common/presentation/presentation_service.mojom (left): https://codereview.chromium.org/979413002/diff/100001/content/common/presentation/presentation_service.mojom#oldcode10 content/common/presentation/presentation_service.mojom:10: PresentationSession session; On 2015/03/12 20:03:41, imcheng1 wrote: > On ...
5 years, 9 months ago (2015-03-13 17:44:35 UTC) #15
imcheng
https://codereview.chromium.org/979413002/diff/100001/content/common/presentation/presentation_service.mojom File content/common/presentation/presentation_service.mojom (left): https://codereview.chromium.org/979413002/diff/100001/content/common/presentation/presentation_service.mojom#oldcode10 content/common/presentation/presentation_service.mojom:10: PresentationSession session; On 2015/03/13 17:44:34, whywhat wrote: > On ...
5 years, 9 months ago (2015-03-13 23:36:46 UTC) #16
whywhat
> I want to understand this a little better. Who is responsible for mapping a ...
5 years, 9 months ago (2015-03-15 13:48:58 UTC) #17
imcheng
On 2015/03/15 13:48:58, whywhat wrote: > > I want to understand this a little better. ...
5 years, 9 months ago (2015-03-16 17:51:38 UTC) #18
whywhat
On 2015/03/16 17:51:38, imcheng1 wrote: > On 2015/03/15 13:48:58, whywhat wrote: > > > I ...
5 years, 9 months ago (2015-03-16 18:12:08 UTC) #19
imcheng
On 2015/03/16 18:12:08, whywhat wrote: > On 2015/03/16 17:51:38, imcheng1 wrote: > > On 2015/03/15 ...
5 years, 9 months ago (2015-03-16 19:38:09 UTC) #20
mark a. foltz
On 2015/03/16 19:38:09, imcheng1 wrote: > On 2015/03/16 18:12:08, whywhat wrote: > > On 2015/03/16 ...
5 years, 9 months ago (2015-03-17 00:13:52 UTC) #21
imcheng
Reverted the session_id patch set. Chatted offline with mark. This patch has gotten pretty large ...
5 years, 9 months ago (2015-03-17 00:52:03 UTC) #22
mark a. foltz
lgtm % remaining comments (almost all on documentation) https://codereview.chromium.org/979413002/diff/320001/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/979413002/diff/320001/content/browser/presentation/presentation_service_impl.cc#newcode69 content/browser/presentation/presentation_service_impl.cc:69: if ...
5 years, 9 months ago (2015-03-18 00:10:58 UTC) #23
imcheng
https://codereview.chromium.org/979413002/diff/320001/content/browser/presentation/presentation_service_impl.cc File content/browser/presentation/presentation_service_impl.cc (right): https://codereview.chromium.org/979413002/diff/320001/content/browser/presentation/presentation_service_impl.cc#newcode69 content/browser/presentation/presentation_service_impl.cc:69: if (it == availability_contexts_.end()) { On 2015/03/18 00:10:58, mark ...
5 years, 9 months ago (2015-03-18 00:56:53 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/979413002/360001
5 years, 9 months ago (2015-03-18 19:23:59 UTC) #27
commit-bot: I haz the power
Committed patchset #17 (id:360001)
5 years, 9 months ago (2015-03-18 19:43:28 UTC) #28
commit-bot: I haz the power
5 years, 9 months ago (2015-03-18 19:44:29 UTC) #29
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/271b9ef3cc86d5c038ff97b3a28ab437eeacbcc3
Cr-Commit-Position: refs/heads/master@{#321195}

Powered by Google App Engine
This is Rietveld 408576698