Chromium Code Reviews
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 #Messages
Total messages: 29 (5 generated)
|