Index: third_party/closure_compiler/externs/networking_private.js |
diff --git a/third_party/closure_compiler/externs/networking_private.js b/third_party/closure_compiler/externs/networking_private.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..32958d48e913ece986962d1c93852f69c9861d8a |
--- /dev/null |
+++ b/third_party/closure_compiler/externs/networking_private.js |
@@ -0,0 +1,301 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+/** @fileoverview Externs generated from namespace: networkingPrivate */ |
+ |
+/** |
+ * WARNING(2015/04/09): This API is still under active development and has a few |
+ * issues with typing: |
+ * |
+ * 1. See onc_spec.html for ONC property values. |
+ * 2. The types NetworkProperties and ManagedNetworkProperties are not currently |
+ * defined. They correspond to ONC Property dictionaries. They are treated as |
+ * Objects rather than types. |
+ * 3. NetworkStateProperties defines a subset of NetworkProperties used by |
+ * getState and getNetworks. Since these match ONC property names they |
+ * use ONC PascalCase naming conventions instead of traditional JS |
+ * camelCase naming. |
+ * |
+ * Because of the above issues, this API should not be used as an example for |
+ * other APIs. Please contact stevenjb@ for questions on and maintenance. |
+ * @const |
+ * @see https://developer.chrome.com/extensions/networkingPrivate |
+ */ |
+chrome.networkingPrivate = {}; |
+ |
+ |
+/** @enum {string} */ |
+chrome.networkingPrivate.ActivationStateType = { |
+ Activated: 'Activated', |
+ Activating: 'Activating', |
+ NotActivated: 'NotActivated', |
+ PartiallyActivated: 'PartiallyActivated', |
+}; |
+ |
+ |
+/** @enum {string} */ |
+chrome.networkingPrivate.ConnectionStateType = { |
+ Connected: 'Connected', |
+ Connecting: 'Connecting', |
+ NotConnected: 'NotConnected', |
+}; |
+ |
+ |
+/** @enum {string} */ |
+chrome.networkingPrivate.IPConfigType = { |
+ DHCP: 'DHCP', |
+ Static: 'Static' |
+}; |
+ |
+ |
+/** @enum {string} */ |
+chrome.networkingPrivate.NetworkType = { |
+ Cellular: 'Cellular', |
+ Ethernet: 'Ethernet', |
+ VPN: 'VPN', |
+ WiFi: 'WiFi', |
+ WiMAX: 'WiMAX', |
+}; |
+ |
+ |
+/** |
+ * @typedef {?{ |
+ * SignalStrength: number, |
+ * OutOfCredits: boolean, |
+ * RoamingState: string, |
+ * ActivationState: chrome.networkingPrivate.ActivationStateType, |
+ * NetworkTechnology: string |
+ * }} |
+ */ |
+chrome.networkingPrivate.CellularStateProperties; |
+ |
+ |
+/** |
+ * @typedef {?{ |
+ * Security: string, |
+ * SignalStrength: number |
+ * }} |
+ */ |
+chrome.networkingPrivate.WiFiStateProperties; |
+ |
+ |
+/** |
+ * @typedef {?{ |
+ * SignalStrength: number |
+ * }} |
+ */ |
+chrome.networkingPrivate.WiMAXStateProperties; |
+ |
+ |
+/** |
+ * @typedef {?{ |
+ * Cellular: chrome.networkingPrivate.CellularStateProperties, |
+ * Connectable: boolean, |
+ * ConnectionState: chrome.networkingPrivate.ConnectionStateType, |
+ * ErrorState: string, |
+ * GUID: string, |
+ * Name: string, |
+ * Source: string, |
+ * Type: chrome.networkingPrivate.NetworkType, |
+ * WiFi: chrome.networkingPrivate.WiFiStateProperties, |
+ * WiMAX: chrome.networkingPrivate.WiMAXStateProperties |
+ * }} |
+ */ |
+chrome.networkingPrivate.NetworkStateProperties; |
+ |
+/** |
+ * @typedef {?{ |
+ * certificate: string, |
+ * publicKey: string, |
+ * nonce: string, |
+ * signedData: string, |
+ * deviceSerial: string, |
+ * deviceSsid: string, |
+ * deviceBssid: string |
+ * }} |
+ */ |
+chrome.networkingPrivate.VerificationProperties; |
+ |
+ |
+/** |
+ * @typedef {?{ |
+ * networkType: string, |
+ * visible: (boolean|undefined), |
+ * configured: (boolean|undefined), |
+ * limit: (number|undefined) |
+ * }} |
+ */ |
+chrome.networkingPrivate.NetworkFilter; |
+ |
+ |
+/** |
+ * @param {string} guid |
+ * @param {function(!Object)} callback |
+ */ |
+chrome.networkingPrivate.getProperties = function(guid, callback) {}; |
+ |
+ |
+/** |
+ * @param {string} guid |
+ * @param {function(!Object)} callback |
+ */ |
+chrome.networkingPrivate.getManagedProperties = function(guid, callback) {}; |
+ |
+ |
+/** |
+ * @param {string} guid |
+ * @param {function(!chrome.networkingPrivate.NetworkStateProperties)} callback |
+ */ |
+chrome.networkingPrivate.getState = function(guid, callback) {}; |
+ |
+ |
+/** |
+ * @param {string} guid |
+ * @param {!Object} properties |
+ * @param {function()=} opt_callback |
+ */ |
+chrome.networkingPrivate.setProperties = function(guid, |
+ properties, |
+ opt_callback) {}; |
+ |
+ |
+/** |
+ * @param {boolean} shared |
+ * @param {!Object} properties |
+ * @param {function(string)=} opt_callback Returns guid of the configured |
+ * configuration. |
+ */ |
+chrome.networkingPrivate.createNetwork = function(shared, |
+ properties, |
+ opt_callback) {}; |
+ |
+ |
+/** |
+ * @param {string} guid |
+ * @param {function()=} opt_callback Called when the operation has completed. |
+ */ |
+chrome.networkingPrivate.forgetNetwork = function(guid, opt_callback) {}; |
+ |
+ |
+/** |
+ * @param {!chrome.networkingPrivate.NetworkFilter} filter |
+ * @param {function(!Array.<!chrome.networkingPrivate.NetworkStateProperties>)=} |
+ * opt_callback |
+ */ |
+chrome.networkingPrivate.getNetworks = function(filter, opt_callback) {}; |
+ |
+ |
+/** |
+ * @param {string} type |
+ * @param {function(!Array.<!chrome.networkingPrivate.NetworkStateProperties>)=} |
+ * opt_callback |
+ */ |
+chrome.networkingPrivate.getVisibleNetworks = function(type, opt_callback) {}; |
+ |
+ |
+/** @param {function(!Array.<string>)=} opt_callback */ |
+chrome.networkingPrivate.getEnabledNetworkTypes = function(opt_callback) {}; |
+ |
+ |
+/** @param {string} networkType */ |
+chrome.networkingPrivate.enableNetworkType = function(networkType) {}; |
+ |
+ |
+/** @param {string} networkType */ |
+chrome.networkingPrivate.disableNetworkType = function(networkType) {}; |
+ |
+ |
+/** |
+ * Requests that the networking subsystem scan for new networks and update the |
+ * list returned by getVisibleNetworks. |
+ */ |
+chrome.networkingPrivate.requestNetworkScan = function() {}; |
+ |
+ |
+/** |
+ * @param {string} guid |
+ * @param {function()=} opt_callback |
+ */ |
+chrome.networkingPrivate.startConnect = function(guid, opt_callback) {}; |
+ |
+ |
+/** |
+ * @param {string} guid |
+ * @param {function()=} opt_callback |
+ */ |
+chrome.networkingPrivate.startDisconnect = function(guid, opt_callback) {}; |
+ |
+ |
+/** |
+ * @param {string} guid |
+ * @param {string=} opt_carrier |
+ * @param {function()=} opt_callback |
+ */ |
+chrome.networkingPrivate.startActivate = function(guid, |
+ opt_carrier, |
+ opt_callback) {}; |
+ |
+ |
+/** |
+ * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo |
+ * @param {function(boolean)} callback |
+ */ |
+chrome.networkingPrivate.verifyDestination = function(verificationInfo, |
+ callback) {}; |
+ |
+ |
+/** |
+ * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo |
+ * @param {string} guid |
+ * @param {function(string)} callback |
+ */ |
+chrome.networkingPrivate.verifyAndEncryptCredentials = |
+ function(verificationInfo, guid, callback) {}; |
+ |
+ |
+/** |
+ * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo |
+ * @param {string} data |
+ * @param {function(string)} callback |
+ */ |
+chrome.networkingPrivate.verifyAndEncryptData = function(verificationInfo, |
+ data, |
+ callback) {}; |
+ |
+ |
+/** |
+ * @param {string} ipOrMacAddress |
+ * @param {boolean} enabled |
+ * @param {function(string)=} opt_callback |
+ */ |
+chrome.networkingPrivate.setWifiTDLSEnabledState = function(ipOrMacAddress, |
+ enabled, |
+ opt_callback) {}; |
+ |
+ |
+/** |
+ * @param {string} ipOrMacAddress |
+ * @param {function(string)} callback |
+ */ |
+chrome.networkingPrivate.getWifiTDLSStatus = function(ipOrMacAddress, |
+ callback) {}; |
+ |
+ |
+/** |
+ * @param {string} guid |
+ * @param {function(string)} callback |
+ */ |
+chrome.networkingPrivate.getCaptivePortalStatus = function(guid, callback) {}; |
+ |
+ |
+/** @type {!ChromeStringArrayEvent} */ |
+chrome.networkingPrivate.onNetworksChanged; |
+ |
+ |
+/** @type {!ChromeStringArrayEvent} */ |
+chrome.networkingPrivate.onNetworkListChanged; |
+ |
+ |
+/** @type {!ChromeStringStringEvent} */ |
+chrome.networkingPrivate.onPortalDetectionCompleted; |