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

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

Issue 1128203005: Add the IDL and stub implementation for the chrome.passwordsPrivate API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase/lint. Created 5 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
« no previous file with comments | « chrome/common/extensions/api/_permission_features.json ('k') | chrome/common/extensions/api/schemas.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/passwords_private.idl
diff --git a/chrome/common/extensions/api/passwords_private.idl b/chrome/common/extensions/api/passwords_private.idl
new file mode 100644
index 0000000000000000000000000000000000000000..7dea8b9e6a336bb3f367348ad0a86a6870938490
--- /dev/null
+++ b/chrome/common/extensions/api/passwords_private.idl
@@ -0,0 +1,80 @@
+// Copyright 2015 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.passwordsPrivate</code> API to add or remove password
+// data from the settings UI.
+namespace passwordsPrivate {
+ // Pair of origin URL and login saved for that URL.
+ dictionary LoginPair {
+ // The human-readable origin for the URL where the password is used.
+ DOMString originUrl;
+
+ // The username used in conjunction with the saved password.
+ DOMString username;
+ };
+
+ // Entry used to display a password in the settings UI.
+ dictionary PasswordUiEntry {
+ // The login information for this entry.
+ LoginPair loginPair;
+
+ // The number of characters in the password; used to display placeholder
+ // dots in the UI.
+ long numCharactersInPassword;
+
+ // Text shown if the password was obtained via a federated identity.
+ DOMString? federationText;
+ };
+
+ callback CanAccountBeManagedCallback = void(boolean canAccountBeManaged);
+ callback PlaintextPasswordCallback = void(DOMString plaintextPassword);
+
+ interface Functions {
+ // Determines whether account's passwords can be managed via
+ // https://passwords.google.com/settings/passwords.
+ //
+ // |callback|: Callback which will be passed the boolean of whether the
+ // account can be managed.
+ static void canPasswordAccountBeManaged(
+ CanAccountBeManagedCallback callback);
+
+ // Removes the saved password corresponding to |loginPair|. If no saved
+ // password for this pair exists, this function is a no-op.
+ //
+ // |loginPair|: The LoginPair corresponding to the entry to remove.
+ static void removeSavedPassword(LoginPair loginPair);
+
+ // Removes the saved password exception corresponding to |exceptionUrl|. If
+ // no exception with this URL exists, this function is a no-op.
+ //
+ // |exceptionUrl|: The URL corresponding to the exception to remove.
+ static void removePasswordException(DOMString exceptionUrl);
+
+ // Returns the plaintext password corresponding to |loginPair|. Note that on
+ // some operating systems, this call may result in an OS-level
+ // reauthentication.
+ //
+ // |loginPair|: The LoginPair corresponding to the entry whose password
+ // is to be returned.
+ // |callback|: Callback which will be passed the plaintext password.
+ static void getPlaintextPassword(
+ LoginPair loginPair, PlaintextPasswordCallback callback);
+ };
+
+ interface Events {
+ // Fired when the saved passwords list has changed, meaning that an entry
+ // has been added or removed. Note that this event fires as soon as a
+ // listener is added.
+ //
+ // |entries|: The updated list of password entries.
+ static void onSavedPasswordsListChanged(PasswordUiEntry[] entries);
+
+ // Fired when the password exceptions list has changed, meaning that an
+ // entry has been added or removed. Note that this event fires as soon as a
+ // listener is added.
+ //
+ // |exceptions|: The updated list of password exceptions.
+ static void onPasswordExceptionsListChanged(DOMString[] exceptions);
+ };
+};
« no previous file with comments | « chrome/common/extensions/api/_permission_features.json ('k') | chrome/common/extensions/api/schemas.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698