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 manage quick unlock. |
| 6 [platforms=("chromeos"), |
| 7 implemented_in="chrome/browser/chromeos/extensions/quick_unlock_private/quick_u
nlock_private_api.h"] |
| 8 namespace quickUnlockPrivate { |
| 9 enum QuickUnlockMode { |
| 10 PIN |
| 11 }; |
| 12 |
| 13 callback BooleanResultCallback = void (boolean value); |
| 14 callback ModesCallback = void (QuickUnlockMode[] modes); |
| 15 |
| 16 interface Functions { |
| 17 // Checks to see if the given password is correct for the currently active |
| 18 // profile. This only checks against the account password, not, for |
| 19 // example, the PIN. |
| 20 static void checkPassword(DOMString password, |
| 21 BooleanResultCallback callback); |
| 22 |
| 23 // Returns the set of quick unlock modes that are available for the user to |
| 24 // use. Some quick unlock modes may be disabled by policy. |
| 25 static void getAvailableModes(ModesCallback onComplete); |
| 26 |
| 27 // Set the quick unlock modes that are active/enabled. Quick unlock can be |
| 28 // disabled by calling this with an empty |modes| array. |
| 29 // |
| 30 // To keep the password for one of the modes the same, pass an empty string. |
| 31 static void setModes(QuickUnlockMode[] modes, DOMString[] passwords, |
| 32 BooleanResultCallback onComplete); |
| 33 |
| 34 // Returns the quick unlock modes that are currently enabled and usable on |
| 35 // the lock screen. |
| 36 static void getActiveModes(ModesCallback onComplete); |
| 37 }; |
| 38 }; |
OLD | NEW |