Implement a browser-side API with the following purposes:
- Notify clients when the set of connected networks has changed
- Identify the set of networks that machine is currently connected to
This API should abstract away any details that are platform-specific whenever possible. The goal is to provide a consistent networking API that can be used by both DIAL (which is used to invalidate the current sink list if machine is disconnected) and Cast MediaSinkServices (which is used to perform sink list caching accoriding to the set of connected networks).
This is what the extension code currently uses:
DIAL: NetworkChangeNotifier: https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/dial/dial_registry.cc?type=cs&sq=package:chromium&l=326 to fire an chrome.dial.onError event.
Cast: chrome.networkingPrivate.onNetworksChanged (onNetworkListChanged on ChromeOS), and chrome.networkingPrivate.getNetworks: https://cs.chromium.org/chromium/src/extensions/common/api/networking_private.idl?type=cs&q=f:networking_private.idl&sq=package:chromium&l=1
Note: there's already some work started on this: https://codereview.chromium.org/2602593002/. We can pick things up from there, with some renaming so it can be shared across DIAL and Cast MediaSinkServices (and possibly others).
Comment 1 by bugdroid1@chromium.org
, Jun 6 2017