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

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: Address comments 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..db7a4c47d42e1f0d687bef98c5c06f2e9c865c9d
--- /dev/null
+++ b/chrome/common/extensions/api/quick_unlock_private.idl
@@ -0,0 +1,52 @@
+// 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
Devlin 2016/06/01 17:44:13 nit: preferred syntax would be |<var>|: descriptio
jdufault 2016/06/03 23:13:16 Done.
+ // 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.
+ // |onComplete| is called with true if the quick unlock state was updated,
+ // false otherwise. The update is treated as a single atomic operation.
+ // 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.
+ static void setModes(DOMString accountPassword,
+ QuickUnlockMode[] modes, DOMString[] credentials,
+ BooleanResultCallback onComplete);
+ };
+
+ interface Events {
+ // 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.
+ static void onActiveModesChanged(QuickUnlockMode[] newModes);
+ };
+};

Powered by Google App Engine
This is Rietveld 408576698