OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 // Use the <code>chrome.quickUnlockPrivate</code> API to change the active quick | |
6 // unlock modes and to change their respective credentials. | |
7 // | |
8 // Quick unlock only supports unlocking an account that has already been signed | |
9 // in. | |
10 // | |
11 // The quick unlock authentication facilities are not available through this | |
12 // API; they are built directly into the lock screen. | |
13 | |
14 [platforms=("chromeos"), | |
15 implemented_in="chrome/browser/chromeos/extensions/quick_unlock_private/quick_u nlock_private_api.h"] | |
16 namespace quickUnlockPrivate { | |
17 // TODO: Add more quick unlock modes, such as a pattern unlock. | |
18 enum QuickUnlockMode { | |
19 PIN | |
20 }; | |
21 | |
22 callback BooleanResultCallback = void (boolean value); | |
23 callback ModesCallback = void (QuickUnlockMode[] modes); | |
24 | |
25 interface Functions { | |
26 // Returns the set of quick unlock modes that are available for the user to | |
27 // use. Some quick unlock modes may be disabled by policy. | |
28 static void getAvailableModes(ModesCallback onComplete); | |
29 | |
30 // Returns the quick unlock modes that are currently enabled and usable on | |
31 // the lock screen. | |
32 static void getActiveModes(ModesCallback onComplete); | |
33 | |
34 // Update the set of quick unlock modes that are currently active/enabled. | |
35 // |accountPassword| is the password associated with the account (e.g. the | |
Devlin
2016/06/01 17:44:13
nit: preferred syntax would be
|<var>|: descriptio
jdufault
2016/06/03 23:13:16
Done.
| |
36 // GAIA password) and is required to change the quick unlock credentials. | |
37 // |modes| is the quick unlock modes that should be active. | |
38 // |credentials| contains the associated credential for each mode. To keep | |
39 // the credential the same for one of the modes, pass an empty string. | |
40 // |onComplete| is called with true if the quick unlock state was updated, | |
41 // false otherwise. The update is treated as a single atomic operation. | |
42 // chrome.runtime.lastError will be set if the API was used incorrectly. | |
Devlin
2016/06/01 17:44:13
This (lastError comment) is standard for all APIs.
jdufault
2016/06/03 23:13:16
Done.
| |
43 static void setModes(DOMString accountPassword, | |
44 QuickUnlockMode[] modes, DOMString[] credentials, | |
45 BooleanResultCallback onComplete); | |
46 }; | |
47 | |
48 interface Events { | |
49 // Called after the active set of quick unlock modes has changed. | |
Devlin
2016/06/01 17:44:13
Might be worth specifying that newModes is the col
jdufault
2016/06/03 23:13:16
Done.
| |
50 static void onActiveModesChanged(QuickUnlockMode[] newModes); | |
51 }; | |
52 }; | |
OLD | NEW |