Description[Media Router] Replace route messaging API.
Remove old callback-based ListenForRouteMessages API and replace it
with StartListeningForRouteMessages and OnRouteMessagesReceived. The
rationale is return value based API doesn't work well for event pages;
when the event page is suspended, the callback supplied by the old API
is lost and cannot be restored when the extension wakes up. Switching
to the listener model unblocks the work to reduce the nessesity of
keeping the event page alive and should result in considerably
simpler logic on the extension side.
To maintain backwards compatibility with older extensions, a smaller
adapter logic is introduced in media_router_bindings.js.
Add missing WakeReason for StartListeningForRouteMessages.
Also added OWNERs for the mojom file to comply with presubmit.
BUG=625007
Committed: https://crrev.com/bf455be1850399b8b374809cfc2584e0611e1c77
Cr-Commit-Position: refs/heads/master@{#406083}
Patch Set 1 : #
Total comments: 10
Patch Set 2 : addressed comments #
Total comments: 2
Patch Set 3 : add crbug in media_router_bindings.js todo #Patch Set 4 : fix tests #
Total comments: 2
Patch Set 5 : Rebase #Messages
Total messages: 37 (16 generated)
|