Index: chrome/common/extensions/api/networking_private.json |
diff --git a/chrome/common/extensions/api/networking_private.json b/chrome/common/extensions/api/networking_private.json |
index db603ccf76241100603be8fa2a5cd8c4010b39b6..7bad1a27458a8932fbd3ad37539b71a60b17c51b 100644 |
--- a/chrome/common/extensions/api/networking_private.json |
+++ b/chrome/common/extensions/api/networking_private.json |
@@ -58,7 +58,7 @@ |
{ |
"id": "NetworkType", |
"type": "string", |
- "enum": ["Ethernet", "WiFi", "Cellular"] |
+ "enum": ["All", "Bluetooth", "Cellular", "Ethernet", "VPN", "Wireless", "WiFi", "Wimax"] |
}, |
{ |
"id": "CaptivePortalStatus", |
@@ -113,7 +113,7 @@ |
}, |
{ |
"name": "getState", |
- "description": "Gets the cached read-only properties of the network with id networkGuid. This is meant to be a higher performance function than getProperties, which requires a round trip to query the networking subsystem. It only returns a subset of the properties returned by getProperties.", |
+ "description": "Gets the cached read-only properties of the network with id networkGuid. This is meant to be a higher performance function than getProperties, which requires a round trip to query the networking subsystem. The following properties are returned for all networks: GUID, Type, Name, WiFi.Security. Additional properties are provided for visible networks: ConnectionState, ErrorState, WiFi.SignalStrength, Cellular.NetworkTechnology, Cellular.ActivationState, Cellular.RoamingState, Cellular.OutOfCredits.", |
"parameters": [ |
{ |
"name": "networkGuid", |
@@ -127,7 +127,7 @@ |
{ |
"name": "properties", |
"$ref": "NetworkProperties", |
- "description": "Results of the query for network properties." |
+ "description": "Results of the query for network state properties." |
} |
] |
} |
@@ -156,7 +156,7 @@ |
}, |
{ |
"name": "createNetwork", |
- "description": "Creates a new network configuration from propeties. If a matching configured network already exists, this will fail. Otherwise returns the guid of the new network.", |
+ "description": "Creates a new network configuration from properties. If a matching configured network already exists, this will fail. Otherwise returns the guid of the new network.", |
"parameters": [ |
{ |
"name": "shared", |
@@ -181,13 +181,56 @@ |
] |
}, |
{ |
+ "name": "getNetworks", |
+ "description": "Returns a list of network objects with the same properties provided by getState. A filter is provided to specify the type of networks returned and to limit the number of networks. Networks are ordered by the system based on their priority, with connected or connecting networks listed first.", |
+ "parameters": [ |
+ { |
+ "name": "filter", |
+ "type": "object", |
+ "properties": { |
+ "networkType": { |
+ "$ref": "NetworkType", |
+ "description": "The type of networks to return." |
+ }, |
+ "visible": { |
+ "type": "boolean", |
+ "optional": true, |
+ "description": "If true, only include visible (physically connected or in-range) networks. Defaults to 'false'." |
+ }, |
+ "configured": { |
+ "type": "boolean", |
+ "optional": true, |
+ "description": "If true, only include configured (saved) networks. Defaults to 'false'." |
+ }, |
+ "limit": { |
+ "type": "integer", |
+ "optional": true, |
+ "description": "Maximum number of networks to return. Defaults to 1000. Use 0 for no limit." |
+ } |
+ } |
+ }, |
+ { |
+ "name": "callback", |
+ "type": "function", |
+ "optional": true, |
+ "parameters": [ |
+ { |
+ "name": "networkList", |
+ "type": "array", |
+ "items": { "$ref": "NetworkProperties" } |
+ } |
+ ] |
+ } |
+ ] |
+ }, |
+ { |
"name": "getVisibleNetworks", |
- "description": "Returns a list of visible network objects with the following ONC properties: GUID, Type, Name, ConnectionState, ErrorState, WiFi.Security, WiFi.SignalStrength, Cellular.NetworkTechnology, Cellular.ActivationState, Cellular.RoamingState. Cellular.OutOfCredits", |
+ "deprecated": "Please use $(ref:networkingPrivate.getNetworks) with filter.visble = true.", |
+ "description": "Returns a list of visible network objects with the same properties provided by getState.", |
"parameters": [ |
{ |
- "name": "type", |
- "type": "string", |
- "enum": ["Ethernet", "WiFi", "Bluetooth", "Cellular", "VPN", "All"], |
+ "name": "networkType", |
+ "$ref": "NetworkType", |
"description": "The type of networks to return." |
}, |
{ |
@@ -206,7 +249,7 @@ |
}, |
{ |
"name": "getEnabledNetworkTypes", |
- "description": "Returns a list of the enabled network type.", |
+ "description": "Returns a list of the enabled network types. Note: this only returns discrete types that can be enabled or disabled: Cellular, Ethernet, WiFi, Wimax.", |
"parameters": [ |
{ |
"name": "callback", |
@@ -214,7 +257,7 @@ |
"optional": true, |
"parameters": [ |
{ |
- "name": "networkList", |
+ "name": "enabledTypes", |
"type": "array", |
"items": { "$ref": "NetworkType" } |
} |
@@ -224,7 +267,7 @@ |
}, |
{ |
"name": "enableNetworkType", |
- "description": "Enable the specified network type.", |
+ "description": "Enable the specified network type. Note, the type might represent multiple network types (e.g. 'Wireless').", |
"parameters": [ |
{ |
"name": "networkType", |
@@ -234,7 +277,7 @@ |
}, |
{ |
"name": "disableNetworkType", |
- "description": "Disable the specified network type.", |
+ "description": "Disable the specified network type. See note for $(ref:networkingPrivate.enableNetworkType).", |
"parameters": [ |
{ |
"name": "networkType", |