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 e96ec4be75c512d13001055ffd32033195e435ea..13259b9ca64fb65046ae3791e77e8fe743456f5f 100644 |
| --- a/extensions/common/api/networking_private.idl |
| +++ b/extensions/common/api/networking_private.idl |
| @@ -9,18 +9,151 @@ |
| // descriptions of properties: |
| // src/components/onc/docs/onc_spec.html, also available at |
| // http://www.chromium.org/chromium-os/chromiumos-design-docs/open-network-configuration |
|
pneubeck (no reviews)
2015/03/27 19:13:43
please check what the notation for urls was
stevenjb
2015/03/27 22:11:14
Done.
|
| +// |
| +// NOTE: Most dictionary properties and enum values use UpperCamelCase to match |
| +// the ONC spec instead of the JavaScript lowerCamelCase convention. |
| +// |
| +// "State" properties describe just the ONC properties returned by |
|
pneubeck (no reviews)
2015/03/27 19:13:43
an alternative naming scheme to StateProperties vs
stevenjb
2015/03/27 22:11:15
I think I prefer the 'Properties'. It makes it a l
|
| +// $(ref:networkingPrivate.getState) and $(ref:networkingPrivate.getNetworks). |
| +// |
| +// "Config" properties describe just the ONC properties that can be configured |
|
pneubeck (no reviews)
2015/03/27 19:13:43
we'll really have to add the dictionary inheritanc
stevenjb
2015/03/27 22:11:15
We should discuss this at some point, but it fact
|
| +// through this API. NOTE: Not all configuration propertes are exposed at this |
|
pneubeck (no reviews)
2015/03/27 19:13:43
propertes -> properties
stevenjb
2015/03/27 22:11:14
Done.
|
| +// time, only those currently required by the Chrome Settings UI. |
| +// TODO(stevenjb): Provide all configuration properties and types, |
| +// crbug.com/380937. |
| +// |
| // TODO(stevenjb/pneubeck): Merge the ONC documentation with this document and |
| // use it as the ONC specification. |
| namespace networkingPrivate { |
| + enum ActivationStateType { |
| + Activated, Activating, NotActivated, PartiallyActivated |
| + }; |
| + |
| enum CaptivePortalStatus { |
| Unknown, Offline, Online, Portal, ProxyAuthRequired |
| }; |
| + enum ConnectionStateType { |
| + Connected, Connecting, NotConnected |
| + }; |
| + |
| + enum IPConfigType { |
| + DHCP, Static |
| + }; |
| + |
| enum NetworkType { |
| All, Bluetooth, Cellular, Ethernet, VPN, Wireless, WiFi, WiMAX |
| }; |
| + dictionary APNProperties { |
|
pneubeck (no reviews)
2015/03/27 19:13:43
neither Config* nor StateProperties
but this is ma
stevenjb
2015/03/27 22:11:15
For sub-dictionaries that can be used in either I
|
| + DOMString? AccessPointName; |
| + DOMString? Language; |
| + DOMString? LocalizedName; |
| + DOMString? Name; |
| + DOMString? Password; |
| + DOMString? Username; |
| + }; |
| + |
| + dictionary CellularConfigProperties { |
| + boolean? AutoConnect; |
| + APNProperties? APN; |
| + }; |
| + |
| + dictionary CellularStateProperties { |
| + ActivationStateType? ActivationState; |
| + DOMString? NetworkTechnology; |
| + boolean? OutOfCredits; |
|
pneubeck (no reviews)
2015/03/27 19:13:43
can't find this in onc_signature.cc nor onc_spec
stevenjb
2015/03/27 22:11:15
Looks like we don't translate it. I think we used
|
| + DOMString? RoamingState; |
| + long? SignalStrength; |
| + }; |
| + |
| + dictionary EthernetStateProperties { |
| + DOMString? Authentication; |
|
pneubeck (no reviews)
2015/03/27 19:13:44
mandatory
stevenjb
2015/03/27 22:11:15
Done.
|
| + }; |
| + |
| + dictionary IPConfigProperties { |
|
pneubeck (no reviews)
2015/03/27 19:13:43
neither Config* nor StateProperties
but this is ma
stevenjb
2015/03/27 22:11:15
Yeah, "IPConfig" is unfortunately named. I think w
|
| + DOMString? Gateway; |
| + DOMString? IPAddress; |
| + DOMString[]? NameServers; |
| + long? RoutingPrefix; |
| + DOMString? Type; |
| + DOMString? WebProxyAutoDiscoveryUrl; |
| + }; |
| + |
| + dictionary IPSecProperties { |
|
pneubeck (no reviews)
2015/03/27 19:13:44
neither Config* nor StateProperties
but this is ma
stevenjb
2015/03/27 22:11:15
Also on purpose.
|
| + DOMString? AuthenticationType; |
|
pneubeck (no reviews)
2015/03/27 19:13:44
mandatory in state
stevenjb
2015/03/27 22:11:15
Done.
|
| + }; |
| + |
| + dictionary ThirdPartyVPNProperties { |
|
pneubeck (no reviews)
2015/03/27 19:13:44
neither Config* nor StateProperties
but this is ma
stevenjb
2015/03/27 22:11:14
Correct.
|
| + DOMString ExtensionID; |
| + }; |
| + |
| + dictionary VPNConfigProperties { |
| + boolean? AutoConnect; |
| + DOMString? Host; |
| + ThirdPartyVPNProperties? ThirdPartyVPN; |
| + DOMString? Type; |
| + }; |
| + |
| + dictionary VPNStateProperties { |
| + DOMString? Type; |
|
pneubeck (no reviews)
2015/03/27 19:13:43
mandatory
stevenjb
2015/03/27 22:11:15
Done.
|
| + IPSecProperties? IPsec; |
| + ThirdPartyVPNProperties? ThirdPartyVPN; |
| + }; |
| + |
| + dictionary WiFiConfigProperties { |
| + boolean? AutoConnect; |
| + DOMString? HexSSID; |
| + DOMString? HiddenSSID; |
|
pneubeck (no reviews)
2015/03/27 19:13:43
must be bool not string
stevenjb
2015/03/27 22:11:14
Oops. Done.
|
| + DOMString? Passphrase; |
| + DOMString? SSID; |
| + DOMString? Security; |
| + }; |
| + |
| + dictionary WiFiStateProperties { |
| + DOMString? Security; |
|
pneubeck (no reviews)
2015/03/27 19:13:43
mandatory
stevenjb
2015/03/27 22:11:15
Done.
|
| + long? SignalStrength; |
|
pneubeck (no reviews)
2015/03/27 19:13:44
wasn't this always set, i.e. 0 for not-visible
the
stevenjb
2015/03/27 22:11:15
Actually, for non-visible networks we don't provid
|
| + }; |
| + |
| + dictionary WiMaxConfigProperties { |
| + boolean? AutoConnect; |
| + }; |
| + |
| + dictionary WiMAXStateProperties { |
| + long? SignalStrength; |
|
pneubeck (no reviews)
2015/03/27 19:13:44
same as for wifi
stevenjb
2015/03/27 22:11:15
Ditto.
|
| + }; |
| + |
| + dictionary NetworkConfigProperties { |
| + CellularConfigProperties? Cellular; |
| + DOMString? GUID; |
| + IPConfigType? IPAddressConfigType; |
| + DOMString? Name; |
| + IPConfigType? NameServersConfigType; |
| + long? Priority; |
| + IPConfigProperties? StaticIPConfig; |
| + NetworkType? Type; |
| + VPNConfigProperties? VPN; |
| + WiFiConfigProperties? WiFi; |
| + WiMaxConfigProperties? WiMAX; |
| + }; |
| + |
| + dictionary NetworkStateProperties { |
| + CellularStateProperties? Cellular; |
| + boolean? Connectable; |
| + ConnectionStateType? ConnectionState; |
| + EthernetStateProperties? Ethernet; |
| + DOMString? ErrorState; |
| + DOMString GUID; |
| + DOMString? Name; |
| + long? Priority; |
| + DOMString? Source; |
| + NetworkType Type; |
| + VPNStateProperties? VPN; |
| + WiFiStateProperties? WiFi; |
| + WiMAXStateProperties? WiMAX; |
| + }; |
| + |
| dictionary VerificationProperties { |
| // A string containing a PEM-encoded (including the 'BEGIN CERTIFICATE' |
| // header and 'END CERTIFICATE' footer) X.509 certificate for use in |
| @@ -79,8 +212,8 @@ namespace networkingPrivate { |
| callback GetPropertiesCallback = void(object result); |
| // TODO(stevenjb): Use ManagedNetworkProperties for |result| once defined. |
| callback GetManagedPropertiesCallback = void(object result); |
| - callback GetStatePropertiesCallback = void(object result); |
| - callback GetNetworksCallback = void(object[] result); |
| + callback GetStatePropertiesCallback = void(NetworkStateProperties result); |
| + callback GetNetworksCallback = void(NetworkStateProperties[] result); |
| callback GetEnabledNetworkTypesCallback = void(NetworkType[] result); |
| callback CaptivePortalStatusCallback = void(CaptivePortalStatus result); |
| @@ -119,7 +252,7 @@ namespace networkingPrivate { |
| // |properties|: The ONC properties to set. |
| // |callback|: Called when the operation has completed. |
| static void setProperties(DOMString networkGuid, |
| - object properties, |
| + NetworkConfigProperties properties, |
| optional VoidCallback callback); |
| // Creates a new network configuration from properties. If a matching |
| @@ -129,7 +262,7 @@ namespace networkingPrivate { |
| // |properties|: The ONC properties to configure the new network with. |
| // |callback|: Returns the identifier of the created network. |
| static void createNetwork(boolean shared, |
| - object properties, |
| + NetworkConfigProperties properties, |
| optional StringCallback callback); |
| // Forgets a network configuration by clearing any configured properties for |