DescriptionMediaRouterAction: Only observe Media Routes when there is a local route.
Currently, MediaRouterAction inherits MediaRoutesObserver, which means it maintains a routes query to the Media Router component extension for the entire lifetime.
Since MediaRouterAction only cares about local routes, this change adds a LocalMediaRoutesObserver for when there are any local routes. The MediaRouterAction will only register a MediaRoutesObserver if there is a local route since it wants updates on whether or not the local route is still active.
The Action's MediaRoutesObserver will be unregistered when there are no more local routes existing or at the end of the Action's lifetime.
BUG=538209
Committed: https://crrev.com/a6617b6c31f7013199edbc3ca1e82d920eeab722
Cr-Commit-Position: refs/heads/master@{#352510}
Patch Set 1 : #
Total comments: 16
Patch Set 2 : Changes per imcheng@'s comments. #
Total comments: 14
Patch Set 3 : Changes per imcheng@'s comments. #Patch Set 4 : Add const to function for MediaRouterAndroid. #
Total comments: 13
Patch Set 5 : Changes per imcheng@ and pkasting@'s comments. #
Total comments: 2
Patch Set 6 : Update comments. #Patch Set 7 : Rebase. #Messages
Total messages: 25 (10 generated)
|