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

Unified Diff: chrome/common/extensions/api/quick_unlock_private.idl

Issue 1968083004: Implement the private API for quick unlock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Rebase Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/quick_unlock_private.idl
diff --git a/chrome/common/extensions/api/quick_unlock_private.idl b/chrome/common/extensions/api/quick_unlock_private.idl
new file mode 100644
index 0000000000000000000000000000000000000000..6bcadc44f136cd342e33440dc61cade156f0ffda
--- /dev/null
+++ b/chrome/common/extensions/api/quick_unlock_private.idl
@@ -0,0 +1,49 @@
+// Copyright 2016 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.
+
+// Use the <code>chrome.quickUnlockPrivate</code> API to change the active quick
+// unlock modes and to change their respective credentials.
+//
+// Quick unlock only supports unlocking an account that has already been signed
+// in.
+//
+// The quick unlock authentication facilities are not available through this
+// API; they are built directly into the lock screen.
+
+[platforms=("chromeos"),
+ implemented_in="chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api.h"]
+namespace quickUnlockPrivate {
+ // TODO: Add more quick unlock modes, such as a pattern unlock.
+ enum QuickUnlockMode {
+ PIN
+ };
+
+ callback BooleanResultCallback = void (boolean value);
+ callback ModesCallback = void (QuickUnlockMode[] modes);
+
+ interface Functions {
+ // Returns the set of quick unlock modes that are available for the user to
+ // use. Some quick unlock modes may be disabled by policy.
+ static void getAvailableModes(ModesCallback onComplete);
+
+ // Returns the quick unlock modes that are currently enabled and usable on
+ // the lock screen.
+ static void getActiveModes(ModesCallback onComplete);
+
+ // Update the set of quick unlock modes that are currently active/enabled.
+ // |accountPassword| is the password associated with the account (e.g. the
+ // GAIA password) and is required to change the quick unlock credentials.
+ // |modes| is the quick unlock modes that should be active. |credentials|
+ // contains the associated credential for each mode. To keep the credential
+ // the same for one of the modes, pass an empty string.
Devlin 2016/05/31 22:58:38 add comments for each param, rather than a giant c
jdufault 2016/06/01 00:07:36 Done.
+ static void setModes(DOMString accountPassword,
Devlin 2016/05/31 22:58:38 We pass a plaintext password?
jdufault 2016/06/01 00:07:36 Yes; the password transformation happens on the C+
+ QuickUnlockMode[] modes, DOMString[] credentials,
+ BooleanResultCallback onComplete);
+ };
+
+ interface Events {
+ // Called after the active set of quick unlock modes has changed.
+ static void onActiveModesChanged(QuickUnlockMode[] newModes);
+ };
+};

Powered by Google App Engine
This is Rietveld 408576698