Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: third_party/closure_compiler/externs/chrome_extensions.js

Issue 1030963003: Use networkingPrivate types in JS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // SSSSSSSSSSSSSSS TTTTTTTTTTTTTTTTTTTTTTT OOOOOOOOO PPPPPPPPPPPPPPPP P 1 // SSSSSSSSSSSSSSS TTTTTTTTTTTTTTTTTTTTTTT OOOOOOOOO PPPPPPPPPPPPPPPP P
2 // SS:::::::::::::::ST:::::::::::::::::::::T OO:::::::::OO P::::::::::::::: :P 2 // SS:::::::::::::::ST:::::::::::::::::::::T OO:::::::::OO P::::::::::::::: :P
3 // S:::::SSSSSS::::::ST:::::::::::::::::::::T OO:::::::::::::OO P::::::PPPPPP::: ::P 3 // S:::::SSSSSS::::::ST:::::::::::::::::::::T OO:::::::::::::OO P::::::PPPPPP::: ::P
4 // S:::::S SSSSSSST:::::TT:::::::TT:::::TO:::::::OOO:::::::OPP:::::P P:: :::P 4 // S:::::S SSSSSSST:::::TT:::::::TT:::::TO:::::::OOO:::::::OPP:::::P P:: :::P
5 // S:::::S TTTTTT T:::::T TTTTTTO::::::O O::::::O P::::P P:: :::P 5 // S:::::S TTTTTT T:::::T TTTTTTO::::::O O::::::O P::::P P:: :::P
6 // S:::::S T:::::T O:::::O O:::::O P::::P P:: :::P 6 // S:::::S T:::::T O:::::O O:::::O P::::P P:: :::P
7 // S::::SSSS P::::PPPPPP::: ::P 7 // S::::SSSS P::::PPPPPP::: ::P
8 // SS::::::SSSSS This file is generated. To update it, P::::::::::::: PP 8 // SS::::::SSSSS This file is generated. To update it, P::::::::::::: PP
9 // SSS::::::::SS run bump_compiler_version. P::::PPPPPPPPP 9 // SSS::::::::SS run bump_compiler_version. P::::PPPPPPPPP
10 // SSSSSS::::S P::::P 10 // SSSSSS::::S P::::P
(...skipping 8378 matching lines...) Expand 10 before | Expand all | Expand 10 after
8389 8389
8390 8390
8391 /** 8391 /**
8392 * @return {boolean} 8392 * @return {boolean}
8393 */ 8393 */
8394 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.hasListeners = 8394 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.hasListeners =
8395 function() {}; 8395 function() {};
8396 8396
8397 8397
8398 /** 8398 /**
8399 * WARNING(2014/08/04): This API is still under active initial development and 8399 * WARNING(2015/04/09): This API is still under active development and has a few
8400 * unstable and has a number of issues: 8400 * issues with typing:
8401 * 8401 *
8402 * 1. The types NetworkProperties and ManagedNetworkProperties are not defined 8402 * 1. See onc_spec.html for ONC property values.
8403 * in the docs; that is, there is no list of fields and their types. 8403 * 2. The types NetworkProperties and ManagedNetworkProperties are not currently
8404 * Therefore, these types are treated as bags-of-objects, rather than types. 8404 * defined. They correspond to ONC Property dictionaries. They are treated as
8405 * 2. According to Steven Bennetts, NetworkProperties *should* be a 8405 * Objects rather than types.
8406 * bag-of-properties as it's a map containing ONC properties and the ONC 8406 * 3. NetworkStateProperties defines a subset of NetworkProperties used by
8407 * properties do not follow the JS field naming conventions; specifically, 8407 * getState and getNetworks. Since these match ONC property names they
8408 * the properties start with an uppercase letter, and at least one property 8408 * use ONC PascalCase naming conventions instead of traditional JS
8409 * is in all uppercase. 8409 * camelCase naming.
8410 * 3. The deviceSsid and deviceBssid fields of VerticationProperties are listed
8411 * as being required while their description mentions "Only set if" which
8412 * sound optional. The dev team was unclear whether they are required or
8413 * optional.
8414 * 4. Some parameters to some functions are marked as being in the Beta channel
8415 * only (for example, the networkGuid parameter to getCaptivePortalStatus).
8416 * 8410 *
8417 * Because of the above issues, this API should not be used as an example for 8411 * Because of the above issues, this API should not be used as an example for
8418 * other APIs added to this file. Please contact mednik@ for questions on and 8412 * other APIs. Please contact stevenjb@ for questions on and maintenance.
8419 * maintenance for this API.
8420 * @const 8413 * @const
8421 * @see https://developer.chrome.com/extensions/networkingPrivate 8414 * @see https://developer.chrome.com/extensions/networkingPrivate
8422 */ 8415 */
8423 chrome.networkingPrivate = {}; 8416 chrome.networkingPrivate = {};
8424 8417
8425 8418
8419 /** @enum {string} */
8420 chrome.networkingPrivate.ActivationStateType = {
8421 Activated: 'Activated',
8422 Activating: 'Activating',
8423 NotActivated: 'NotActivated',
8424 PartiallyActivated: 'PartiallyActivated',
8425 };
8426
8427
8428 /** @enum {string} */
8429 chrome.networkingPrivate.ConnectionStateType = {
8430 Connected: 'Connected',
8431 Connecting: 'Connecting',
8432 NotConnected: 'NotConnected',
8433 };
8434
8435
8436 /** @enum {string} */
8437 chrome.networkingPrivate.IPConfigType = {
8438 DHCP: 'DHCP',
8439 Static: 'Static'
8440 };
8441
8442
8443 /** @enum {string} */
8444 chrome.networkingPrivate.NetworkType = {
8445 Cellular: 'Cellular',
8446 Ethernet: 'Ethernet',
8447 VPN: 'VPN',
8448 WiFi: 'WiFi',
8449 WiMAX: 'WiMAX',
8450 };
8451
8452
8453 /**
8454 * @typedef {?{
8455 * SignalStrength: number,
8456 * OutOfCredits: boolean,
8457 * RoamingState: string,
8458 * ActivationState: chrome.networkingPrivate.ActivationStateType,
8459 * NetworkTechnology: string
8460 * }}
8461 */
8462 chrome.networkingPrivate.CellularStateProperties;
8463
8464
8465 /**
8466 * @typedef {?{
8467 * Security: string,
8468 * SignalStrength: number
8469 * }}
8470 */
8471 chrome.networkingPrivate.WiFiStateProperties;
8472
8473
8474 /**
8475 * @typedef {?{
8476 * SignalStrength: number
8477 * }}
8478 */
8479 chrome.networkingPrivate.WiMAXStateProperties;
8480
8481
8482 /**
8483 * @typedef {?{
8484 * Cellular: chrome.networkingPrivate.CellularStateProperties,
8485 * Connectable: boolean,
8486 * ConnectionState: chrome.networkingPrivate.ConnectionStateType,
8487 * ErrorState: string,
8488 * GUID: string,
8489 * Name: string,
8490 * Source: string,
8491 * Type: chrome.networkingPrivate.NetworkType,
8492 * WiFi: chrome.networkingPrivate.WiFiStateProperties,
8493 * WiMAX: chrome.networkingPrivate.WiMAXStateProperties
8494 * }}
8495 */
8496 chrome.networkingPrivate.NetworkStateProperties;
8497
8426 /** 8498 /**
8427 * @typedef {?{ 8499 * @typedef {?{
8428 * certificate: string, 8500 * certificate: string,
8429 * publicKey: string, 8501 * publicKey: string,
8430 * nonce: string, 8502 * nonce: string,
8431 * signedData: string, 8503 * signedData: string,
8432 * deviceSerial: string, 8504 * deviceSerial: string,
8433 * deviceSsid: string, 8505 * deviceSsid: string,
8434 * deviceBssid: string 8506 * deviceBssid: string
8435 * }} 8507 * }}
(...skipping 21 matching lines...) Expand all
8457 8529
8458 /** 8530 /**
8459 * @param {string} guid 8531 * @param {string} guid
8460 * @param {function(!Object)} callback 8532 * @param {function(!Object)} callback
8461 */ 8533 */
8462 chrome.networkingPrivate.getManagedProperties = function(guid, callback) {}; 8534 chrome.networkingPrivate.getManagedProperties = function(guid, callback) {};
8463 8535
8464 8536
8465 /** 8537 /**
8466 * @param {string} guid 8538 * @param {string} guid
8467 * @param {function(!Object)} callback 8539 * @param {function(!chrome.networkingPrivate.NetworkStateProperties)} callback
8468 */ 8540 */
8469 chrome.networkingPrivate.getState = function(guid, callback) {}; 8541 chrome.networkingPrivate.getState = function(guid, callback) {};
8470 8542
8471 8543
8472 /** 8544 /**
8473 * @param {string} guid 8545 * @param {string} guid
8474 * @param {!Object} properties 8546 * @param {!Object} properties
8475 * @param {function()=} callback 8547 * @param {function()=} opt_callback
8476 */ 8548 */
8477 chrome.networkingPrivate.setProperties = function(guid, properties, callback) { 8549 chrome.networkingPrivate.setProperties = function(guid,
8478 }; 8550 properties,
8551 opt_callback) {};
8479 8552
8480 8553
8481 /** 8554 /**
8482 * @param {boolean} shared 8555 * @param {boolean} shared
8483 * @param {!Object} properties 8556 * @param {!Object} properties
8484 * @param {function(string)} callback Returns guid of the configured 8557 * @param {function(string)=} opt_callback Returns guid of the configured
8485 * configuration. 8558 * configuration.
8486 */ 8559 */
8487 chrome.networkingPrivate.createNetwork = 8560 chrome.networkingPrivate.createNetwork = function(shared,
8488 function(shared, properties, callback) {}; 8561 properties,
8562 opt_callback) {};
8489 8563
8490 8564
8491 /** 8565 /**
8492 * @param {string} guid 8566 * @param {string} guid
8493 * @param {function()=} opt_callback 8567 * @param {function()=} opt_callback Called when the operation has completed.
8494 */ 8568 */
8495 chrome.networkingPrivate.forgetNetwork = function(guid, opt_callback) {}; 8569 chrome.networkingPrivate.forgetNetwork = function(guid, opt_callback) {};
8496 8570
8497 8571
8498 /** 8572 /**
8499 * @param {!chrome.networkingPrivate.NetworkFilter} filter 8573 * @param {!chrome.networkingPrivate.NetworkFilter} filter
8500 * @param {function(!Array.<!Object>)=} opt_callback 8574 * @param {function(!Array.<!chrome.networkingPrivate.NetworkStateProperties>)=}
8575 * opt_callback
8501 */ 8576 */
8502 chrome.networkingPrivate.getNetworks = function(filter, opt_callback) {}; 8577 chrome.networkingPrivate.getNetworks = function(filter, opt_callback) {};
8503 8578
8504 8579
8505 /** 8580 /**
8506 * @param {string} type 8581 * @param {string} type
8507 * @param {function(!Array.<!Object>)=} opt_callback 8582 * @param {function(!Array.<!chrome.networkingPrivate.NetworkStateProperties>)=}
8583 * opt_callback
8508 */ 8584 */
8509 chrome.networkingPrivate.getVisibleNetworks = function(type, opt_callback) {}; 8585 chrome.networkingPrivate.getVisibleNetworks = function(type, opt_callback) {};
8510 8586
8511 8587
8512 /** @param {function(!Array.<string>)=} opt_callback */ 8588 /** @param {function(!Array.<string>)=} opt_callback */
8513 chrome.networkingPrivate.getEnabledNetworkTypes = function(opt_callback) {}; 8589 chrome.networkingPrivate.getEnabledNetworkTypes = function(opt_callback) {};
8514 8590
8515 8591
8516 /** @param {string} networkType */ 8592 /** @param {string} networkType */
8517 chrome.networkingPrivate.enableNetworkType = function(networkType) {}; 8593 chrome.networkingPrivate.enableNetworkType = function(networkType) {};
(...skipping 30 matching lines...) Expand all
8548 * @param {function()=} opt_callback 8624 * @param {function()=} opt_callback
8549 */ 8625 */
8550 chrome.networkingPrivate.startActivate = 8626 chrome.networkingPrivate.startActivate =
8551 function(guid, opt_carrierOrCallback, opt_callback) {}; 8627 function(guid, opt_carrierOrCallback, opt_callback) {};
8552 8628
8553 8629
8554 /** 8630 /**
8555 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo 8631 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
8556 * @param {function(boolean)} callback 8632 * @param {function(boolean)} callback
8557 */ 8633 */
8558 chrome.networkingPrivate.verifyDestination = 8634 chrome.networkingPrivate.verifyDestination = function(verificationInfo,
8559 function(verificationInfo, callback) {}; 8635 callback) {};
8560 8636
8561 8637
8562 /** 8638 /**
8563 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo 8639 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
8564 * @param {string} guid 8640 * @param {string} guid
8565 * @param {function(string)} callback 8641 * @param {function(string)} callback
8566 */ 8642 */
8567 chrome.networkingPrivate.verifyAndEncryptCredentials = 8643 chrome.networkingPrivate.verifyAndEncryptCredentials =
8568 function(verificationInfo, guid, callback) {}; 8644 function(verificationInfo, guid, callback) {};
8569 8645
8570 8646
8571 /** 8647 /**
8572 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo 8648 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
8573 * @param {string} data 8649 * @param {string} data
8574 * @param {function(string)} callback 8650 * @param {function(string)} callback
8575 */ 8651 */
8576 chrome.networkingPrivate.verifyAndEncryptData = 8652 chrome.networkingPrivate.verifyAndEncryptData = function(verificationInfo,
8577 function(verificationInfo, data, callback) {}; 8653 data,
8654 callback) {};
8578 8655
8579 8656
8580 /** 8657 /**
8581 * @param {string} ipOrMacAddress 8658 * @param {string} ipOrMacAddress
8582 * @param {boolean} enabled 8659 * @param {boolean} enabled
8583 * @param {function(string)} callback 8660 * @param {function(string)=} opt_callback
8584 */ 8661 */
8585 chrome.networkingPrivate.setWifiTDLSEnabledState = 8662 chrome.networkingPrivate.setWifiTDLSEnabledState = function(ipOrMacAddress,
8586 function(ipOrMacAddress, enabled, callback) {}; 8663 enabled,
8664 opt_callback) {};
8587 8665
8588 8666
8589 /** 8667 /**
8590 * @param {string} ipOrMacAddress 8668 * @param {string} ipOrMacAddress
8591 * @param {function(string)} callback 8669 * @param {function(string)} callback
8592 */ 8670 */
8593 chrome.networkingPrivate.getWifiTDLSStatus = 8671 chrome.networkingPrivate.getWifiTDLSStatus = function(ipOrMacAddress,
8594 function(ipOrMacAddress, callback) {}; 8672 callback) {};
8595 8673
8596 8674
8597 /** 8675 /**
8598 * @param {string} guid 8676 * @param {string} guid
8599 * @param {function(string)} callback 8677 * @param {function(string)} callback
8600 */ 8678 */
8601 chrome.networkingPrivate.getCaptivePortalStatus = function(guid, callback) {}; 8679 chrome.networkingPrivate.getCaptivePortalStatus = function(guid, callback) {};
8602 8680
8603 8681
8604 /** @type {!ChromeStringArrayEvent} */ 8682 /** @type {!ChromeStringArrayEvent} */
8605 chrome.networkingPrivate.onNetworksChanged; 8683 chrome.networkingPrivate.onNetworksChanged;
8606 8684
8607 8685
8608 /** @type {!ChromeStringArrayEvent} */ 8686 /** @type {!ChromeStringArrayEvent} */
8609 chrome.networkingPrivate.onNetworkListChanged; 8687 chrome.networkingPrivate.onNetworkListChanged;
8610 8688
8611 8689
8612 /** @type {!ChromeStringStringEvent} */ 8690 /** @type {!ChromeStringStringEvent} */
8613 chrome.networkingPrivate.onPortalDetectionCompleted; 8691 chrome.networkingPrivate.onPortalDetectionCompleted;
8614 8692
8615
8616 /** 8693 /**
8617 * WARNING(2014/08/14): This API is still under active initial development and 8694 * WARNING(2014/08/14): This API is still under active initial development and
8618 * unstable. The types are not well defined or documented, and this API 8695 * unstable. The types are not well defined or documented, and this API
8619 * definition here should not be used as an example for other APIs added to this 8696 * definition here should not be used as an example for other APIs added to this
8620 * file. Please contact mednik@ for questions on and maintenance for this API. 8697 * file. Please contact mednik@ for questions on and maintenance for this API.
8621 * @const 8698 * @const
8622 * @see http://goo.gl/afV8wB 8699 * @see http://goo.gl/afV8wB
8623 */ 8700 */
8624 chrome.mdns = {}; 8701 chrome.mdns = {};
8625 8702
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
9007 9084
9008 9085
9009 /** 9086 /**
9010 * Installs the given app ID. 9087 * Installs the given app ID.
9011 * @param {string} id 9088 * @param {string} id
9012 * @param {function(string, string): void=} opt_callback Response callback that 9089 * @param {function(string, string): void=} opt_callback Response callback that
9013 * returns two string: (1) an error string (or empty string on success) and 9090 * returns two string: (1) an error string (or empty string on success) and
9014 * (2) an error code in case of error 9091 * (2) an error code in case of error
9015 */ 9092 */
9016 chrome.inlineInstallPrivate.install = function(id, opt_callback) {}; 9093 chrome.inlineInstallPrivate.install = function(id, opt_callback) {};
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698