Chromium Code Reviews| Index: extensions/common/api/networking_private.idl |
| diff --git a/extensions/common/api/networking_private.idl b/extensions/common/api/networking_private.idl |
| index 3173fb0a3e4b899a32ad3f96b606883e6b8b3e35..ee1abf5eb2bf59ac5472d1f3688523824da3be1a 100644 |
| --- a/extensions/common/api/networking_private.idl |
| +++ b/extensions/common/api/networking_private.idl |
| @@ -40,12 +40,23 @@ namespace networkingPrivate { |
| Connected, Connecting, NotConnected |
| }; |
| + enum DeviceStateType { |
| + // Device is available but not initialized. |
| + Uninitialized, |
| + // Device is intialized but not enabled. |
| + Disabled, |
| + // Enabled state has been requested but has not completed. |
| + Enabling, |
| + // Device is enabled. |
| + Enabled |
| + }; |
| + |
| enum IPConfigType { |
| DHCP, Static |
| }; |
| enum NetworkType { |
| - All, Bluetooth, Cellular, Ethernet, VPN, Wireless, WiFi, WiMAX |
|
pneubeck (no reviews)
2015/04/08 10:05:07
is this related?
stevenjb
2015/04/08 20:27:30
Kind of. We never supported it, for networking, an
|
| + All, Cellular, Ethernet, VPN, Wireless, WiFi, WiMAX |
| }; |
| dictionary APNProperties { |
| @@ -74,6 +85,15 @@ namespace networkingPrivate { |
| long? SignalStrength; |
| }; |
| + dictionary DeviceStateProperties { |
| + // The current state of the device. |
| + DeviceStateType State; |
| + |
| + // The network type associated with the device (Cellular, Ethernet, WiFi, or |
| + // WiMAX). |
| + NetworkType Type; |
| + }; |
| + |
| dictionary EthernetStateProperties { |
| DOMString Authentication; |
| }; |
| @@ -221,6 +241,7 @@ namespace networkingPrivate { |
| callback GetManagedPropertiesCallback = void(object result); |
| callback GetStatePropertiesCallback = void(NetworkStateProperties result); |
| callback GetNetworksCallback = void(NetworkStateProperties[] result); |
| + callback GetDeviceStatesCallback = void(DeviceStateProperties[] result); |
| callback GetEnabledNetworkTypesCallback = void(NetworkType[] result); |
| callback CaptivePortalStatusCallback = void(CaptivePortalStatus result); |
| @@ -300,18 +321,20 @@ namespace networkingPrivate { |
| NetworkType networkType, |
| GetNetworksCallback callback); |
| - // Returns a list of the enabled network types. Note: this only returns |
| - // discrete types that can be enabled or disabled: Cellular, Ethernet, WiFi, |
| - // Wimax. |
| - // |callback|: Called immediately with the enabled network types. |
| - static void getEnabledNetworkTypes(GetEnabledNetworkTypesCallback callback); |
| + // Deprecated. Please use $(ref:networkingPrivate.getDeviceStates) instead. |
| + [deprecated="Use getDeviceStates."] static void getEnabledNetworkTypes( |
| + GetEnabledNetworkTypesCallback callback); |
| + |
| + // Returns a list of $(ref:networkingPrivate.DeviceStateProperties) objects. |
| + // |callback|: Called with a dictionary of devices and their state. |
|
pneubeck (no reviews)
2015/04/08 10:05:07
dictionary -> list
stevenjb
2015/04/08 20:27:30
Done.
|
| + static void getDeviceStates(GetDeviceStatesCallback callback); |
| - // Enable the specified network type. Note, the type might represent |
| - // multiple network types (e.g. 'Wireless'). |
| + // Enables any devices matching the specified network type. Note, the type |
| + // might represent multiple network types (e.g. 'Wireless'). |
| // |networkType|: The type of network to enable. |
| static void enableNetworkType(NetworkType networkType); |
| - // Disable the specified network type. See note for |
| + // Disables any devices matching the specified network type. See note for |
| // $(ref:networkingPrivate.enableNetworkType). |
| // |networkType|: The type of network to disable. |
| static void disableNetworkType(NetworkType networkType); |