| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file was generated by: | 5 // This file was generated by: |
| 6 // ./tools/json_schema_compiler/compiler.py. | 6 // ./tools/json_schema_compiler/compiler.py. |
| 7 // NOTE: The format of types has changed. 'FooType' is now | 7 // NOTE: The format of types has changed. 'FooType' is now |
| 8 // 'chrome.quickUnlockPrivate.FooType'. | 8 // 'chrome.quickUnlockPrivate.FooType'. |
| 9 // Please run the closure compiler before committing changes. | 9 // Please run the closure compiler before committing changes. |
| 10 // See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_comp
ilation.md | 10 // See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_comp
ilation.md |
| 11 | 11 |
| 12 /** @fileoverview Externs generated from namespace: quickUnlockPrivate */ | 12 /** @fileoverview Externs generated from namespace: quickUnlockPrivate */ |
| 13 | 13 |
| 14 /** | 14 /** |
| 15 * @const | 15 * @const |
| 16 */ | 16 */ |
| 17 chrome.quickUnlockPrivate = {}; | 17 chrome.quickUnlockPrivate = {}; |
| 18 | 18 |
| 19 /** | 19 /** |
| 20 * @enum {string} | 20 * @enum {string} |
| 21 * @see https://developer.chrome.com/extensions/quickUnlockPrivate#type-QuickUnl
ockMode | 21 * @see https://developer.chrome.com/extensions/quickUnlockPrivate#type-QuickUnl
ockMode |
| 22 */ | 22 */ |
| 23 chrome.quickUnlockPrivate.QuickUnlockMode = { | 23 chrome.quickUnlockPrivate.QuickUnlockMode = { |
| 24 PIN: 'PIN', | 24 PIN: 'PIN', |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * @enum {string} |
| 29 * @see https://developer.chrome.com/extensions/quickUnlockPrivate#type-Credenti
alProblem |
| 30 */ |
| 31 chrome.quickUnlockPrivate.CredentialProblem = { |
| 32 TOO_SHORT: 'TOO_SHORT', |
| 33 TOO_LONG: 'TOO_LONG', |
| 34 TOO_WEAK: 'TOO_WEAK', |
| 35 CONTAINS_NONDIGIT: 'CONTAINS_NONDIGIT', |
| 36 }; |
| 37 |
| 38 /** |
| 39 * @typedef {{ |
| 40 * errors: !Array<!chrome.quickUnlockPrivate.CredentialProblem>, |
| 41 * warnings: !Array<!chrome.quickUnlockPrivate.CredentialProblem> |
| 42 * }} |
| 43 * @see https://developer.chrome.com/extensions/quickUnlockPrivate#type-Credenti
alCheck |
| 44 */ |
| 45 chrome.quickUnlockPrivate.CredentialCheck; |
| 46 |
| 47 /** |
| 48 * @typedef {{ |
| 49 * minLength: number, |
| 50 * maxLength: number |
| 51 * }} |
| 52 * @see https://developer.chrome.com/extensions/quickUnlockPrivate#type-Credenti
alRequirements |
| 53 */ |
| 54 chrome.quickUnlockPrivate.CredentialRequirements; |
| 55 |
| 56 /** |
| 28 * Returns the set of quick unlock modes that are available for the user to use. | 57 * Returns the set of quick unlock modes that are available for the user to use. |
| 29 * Some quick unlock modes may be disabled by policy. | 58 * Some quick unlock modes may be disabled by policy. |
| 30 * @param {function(!Array<!chrome.quickUnlockPrivate.QuickUnlockMode>):void} | 59 * @param {function(!Array<!chrome.quickUnlockPrivate.QuickUnlockMode>):void} |
| 31 * onComplete | 60 * onComplete |
| 32 * @see https://developer.chrome.com/extensions/quickUnlockPrivate#method-getAva
ilableModes | 61 * @see https://developer.chrome.com/extensions/quickUnlockPrivate#method-getAva
ilableModes |
| 33 */ | 62 */ |
| 34 chrome.quickUnlockPrivate.getAvailableModes = function(onComplete) {}; | 63 chrome.quickUnlockPrivate.getAvailableModes = function(onComplete) {}; |
| 35 | 64 |
| 36 /** | 65 /** |
| 37 * Returns the quick unlock modes that are currently enabled and usable on the | 66 * Returns the quick unlock modes that are currently enabled and usable on the |
| 38 * lock screen. | 67 * lock screen. |
| 39 * @param {function(!Array<!chrome.quickUnlockPrivate.QuickUnlockMode>):void} | 68 * @param {function(!Array<!chrome.quickUnlockPrivate.QuickUnlockMode>):void} |
| 40 * onComplete | 69 * onComplete |
| 41 * @see https://developer.chrome.com/extensions/quickUnlockPrivate#method-getAct
iveModes | 70 * @see https://developer.chrome.com/extensions/quickUnlockPrivate#method-getAct
iveModes |
| 42 */ | 71 */ |
| 43 chrome.quickUnlockPrivate.getActiveModes = function(onComplete) {}; | 72 chrome.quickUnlockPrivate.getActiveModes = function(onComplete) {}; |
| 44 | 73 |
| 45 /** | 74 /** |
| 75 * Checks if the given credential can be used for the given unlock mode. |
| 76 * Enterprise policy can change credential requirements. |
| 77 * @param {!chrome.quickUnlockPrivate.QuickUnlockMode} mode The quick unlock |
| 78 * mode that is used. |
| 79 * @param {string} credential The given credential. |
| 80 * @param {function(!chrome.quickUnlockPrivate.CredentialCheck):void} onComplete |
| 81 * Called with a list of warnings and errors the given |credential| has |
| 82 * (or an empty list if there are none). |
| 83 * @see https://developer.chrome.com/extensions/quickUnlockPrivate#method-checkC
redential |
| 84 */ |
| 85 chrome.quickUnlockPrivate.checkCredential = function(mode, credential, onComplet
e) {}; |
| 86 |
| 87 /** |
| 88 * Gets the credential requirements for the given unlock mode. |
| 89 * @param {!chrome.quickUnlockPrivate.QuickUnlockMode} mode The quick unlock |
| 90 * mode that is used. |
| 91 * @param {function(!chrome.quickUnlockPrivate.CredentialRequirements):void} |
| 92 * onComplete Called with the credential requirements of the given |
| 93 * |mode|. |
| 94 * @see https://developer.chrome.com/extensions/quickUnlockPrivate#method-getCre
dentialRequirements |
| 95 */ |
| 96 chrome.quickUnlockPrivate.getCredentialRequirements = function(mode, onComplete)
{}; |
| 97 |
| 98 /** |
| 46 * Update the set of quick unlock modes that are currently active/enabled. | 99 * Update the set of quick unlock modes that are currently active/enabled. |
| 47 * @param {string} accountPassword The password associated with the account | 100 * @param {string} accountPassword The password associated with the account |
| 48 * (e.g. the GAIA password). This is required to change the quick unlock | 101 * (e.g. the GAIA password). This is required to change the quick unlock |
| 49 * credentials. | 102 * credentials. |
| 50 * @param {!Array<!chrome.quickUnlockPrivate.QuickUnlockMode>} modes The quick | 103 * @param {!Array<!chrome.quickUnlockPrivate.QuickUnlockMode>} modes The quick |
| 51 * unlock modes that should be active. | 104 * unlock modes that should be active. |
| 52 * @param {!Array<string>} credentials The associated credential for each mode. | 105 * @param {!Array<string>} credentials The associated credential for each mode. |
| 53 * To keep the credential the same for the associated mode, pass an empty | 106 * To keep the credential the same for the associated mode, pass an empty |
| 54 * string. | 107 * string. |
| 55 * @param {function(boolean):void} onComplete Called with true if the quick | 108 * @param {function(boolean):void} onComplete Called with true if the quick |
| 56 * unlock state was updated, false otherwise. The update is treated as a | 109 * unlock state was updated, false otherwise. The update is treated as a |
| 57 * single atomic operation. | 110 * single atomic operation. |
| 58 * @see https://developer.chrome.com/extensions/quickUnlockPrivate#method-setMod
es | 111 * @see https://developer.chrome.com/extensions/quickUnlockPrivate#method-setMod
es |
| 59 */ | 112 */ |
| 60 chrome.quickUnlockPrivate.setModes = function(accountPassword, modes, credential
s, onComplete) {}; | 113 chrome.quickUnlockPrivate.setModes = function(accountPassword, modes, credential
s, onComplete) {}; |
| 61 | 114 |
| 62 /** | 115 /** |
| 63 * Called after the active set of quick unlock modes has changed. | 116 * Called after the active set of quick unlock modes has changed. |
| 64 * @type {!ChromeEvent} | 117 * @type {!ChromeEvent} |
| 65 * @see https://developer.chrome.com/extensions/quickUnlockPrivate#event-onActiv
eModesChanged | 118 * @see https://developer.chrome.com/extensions/quickUnlockPrivate#event-onActiv
eModesChanged |
| 66 */ | 119 */ |
| 67 chrome.quickUnlockPrivate.onActiveModesChanged; | 120 chrome.quickUnlockPrivate.onActiveModesChanged; |
| OLD | NEW |