From 7288268a683040968054a3dcfedef28d9151bc1d Mon Sep 17 00:00:00 2001 From: cernekee Date: Wed, 16 Mar 2016 15:18:56 -0700 Subject: Extend vpnProvider to allow reconnections Upcoming changes in the Chrome OS networking daemon (shill) will allow third party VPNs to transition "backwards" from Online->Configuring if the default physical connection changes. Add a "reconnect" flag so that VPN apps can signal their compatibility with this new scheme, and add the necessary UI changes so that Chrome can identify reconnections and present them to the user in a sensible way. Also, change the UI so that users can cancel VPN reconnections (and connections) using the "Disconnect" button. BUG=514343 Review URL: https://codereview.chromium.org/1722453002 Cr-Commit-Position: refs/heads/master@{#381566} --- extensions/common/api/vpn_provider.idl | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'extensions/common') diff --git a/extensions/common/api/vpn_provider.idl b/extensions/common/api/vpn_provider.idl index a826522..75bd873 100644 --- a/extensions/common/api/vpn_provider.idl +++ b/extensions/common/api/vpn_provider.idl @@ -40,6 +40,19 @@ namespace vpnProvider { DOMString[]? domainSearch; // A list of IPs for the DNS servers. DOMString[] dnsServers; + // Whether or not the VPN extension implements auto-reconnection. + // + // If true, the linkDown, linkUp, + // linkChanged, suspend, and resume + // platform messages will be used to signal the respective events. + // If false, the system will forcibly disconnect the VPN if the network + // topology changes, and the user will need to reconnect manually. + // (default: false) + // + // This property is new in Chrome 51; it will generate an exception in + // earlier versions. try/catch can be used to conditionally enable the + // feature based on browser support. + DOMString? reconnect; }; // The enum is used by the platform to notify the client of the VPN session @@ -52,7 +65,20 @@ namespace vpnProvider { // An error occurred in VPN connection, for example a timeout. A description // of the error is give as the // error argument to onPlatformMessage. - error + error, + // The default physical network connection is down. + linkDown, + // The default physical network connection is back up. + linkUp, + // The default physical network connection changed, e.g. wifi->mobile. + linkChanged, + // The OS is preparing to suspend, so the VPN should drop its connection. + // The extension is not guaranteed to receive this event prior to + // suspending. + suspend, + // The OS has resumed and the user has logged back in, so the VPN should + // try to reconnect. + resume }; // The enum is used by the VPN client to inform the platform -- cgit v1.1