summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorkhorimoto <khorimoto@chromium.org>2015-05-11 11:44:37 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-11 18:45:56 +0000
commitfb89adeac917aa1d2178f0051acbf823e725b4ca (patch)
tree7faffac9c2aef5bf8e5bcac275a92425986e25e0 /third_party
parent5f5ca917836848923efc9369c788647f329a0d58 (diff)
downloadchromium_src-fb89adeac917aa1d2178f0051acbf823e725b4ca.zip
chromium_src-fb89adeac917aa1d2178f0051acbf823e725b4ca.tar.gz
chromium_src-fb89adeac917aa1d2178f0051acbf823e725b4ca.tar.bz2
Add the IDL and stub implementation for the chrome.passwordsPrivate API.
See https://docs.google.com/document/d/1vapDN-76XS4dLsNRFQP9NMnhDstPAC88vPuKblhgMok/edit?usp=sharing for details. BUG=485227 Review URL: https://codereview.chromium.org/1128203005 Cr-Commit-Position: refs/heads/master@{#329204}
Diffstat (limited to 'third_party')
-rw-r--r--third_party/closure_compiler/externs/autofill_private.js2
-rw-r--r--third_party/closure_compiler/externs/passwords_private.js87
2 files changed, 88 insertions, 1 deletions
diff --git a/third_party/closure_compiler/externs/autofill_private.js b/third_party/closure_compiler/externs/autofill_private.js
index 05ea05e..bb34658 100644
--- a/third_party/closure_compiler/externs/autofill_private.js
+++ b/third_party/closure_compiler/externs/autofill_private.js
@@ -59,7 +59,7 @@ var AddressEntry;
/**
* @typedef {{
- * field: number,
+ * field: !chrome.autofillPrivate.AddressField,
* fieldName: string,
* isLongField: boolean,
* placeholder: (string|undefined)
diff --git a/third_party/closure_compiler/externs/passwords_private.js b/third_party/closure_compiler/externs/passwords_private.js
new file mode 100644
index 0000000..94a528b
--- /dev/null
+++ b/third_party/closure_compiler/externs/passwords_private.js
@@ -0,0 +1,87 @@
+// 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.
+
+/** @fileoverview Externs generated from namespace: passwordsPrivate */
+
+/**
+ * @const
+ */
+chrome.passwordsPrivate = {};
+
+/**
+ * @typedef {{
+ * originUrl: string,
+ * username: string
+ * }}
+ * @see https://developer.chrome.com/extensions/passwordsPrivate#type-LoginPair
+ */
+var LoginPair;
+
+/**
+ * @typedef {{
+ * loginPair: LoginPair,
+ * numCharactersInPassword: number,
+ * federationText: (string|undefined)
+ * }}
+ * @see https://developer.chrome.com/extensions/passwordsPrivate#type-PasswordUiEntry
+ */
+var PasswordUiEntry;
+
+/**
+ * Determines whether account's passwords can be managed via
+ * https://passwords.google.com/settings/passwords.
+ * @param {function(boolean):void} callback Callback which will be passed the
+ * boolean of whether the account can be managed.
+ * @see https://developer.chrome.com/extensions/passwordsPrivate#method-canPasswordAccountBeManaged
+ */
+chrome.passwordsPrivate.canPasswordAccountBeManaged = function(callback) {};
+
+/**
+ * Removes the saved password corresponding to |loginPair|. If no saved password
+ * for this pair exists, this function is a no-op.
+ * @param {LoginPair} loginPair The LoginPair corresponding to the entry to
+ * remove.
+ * @see https://developer.chrome.com/extensions/passwordsPrivate#method-removeSavedPassword
+ */
+chrome.passwordsPrivate.removeSavedPassword = function(loginPair) {};
+
+/**
+ * Removes the saved password exception corresponding to |exceptionUrl|. If no
+ * exception with this URL exists, this function is a no-op.
+ * @param {string} exceptionUrl The URL corresponding to the exception to
+ * remove.
+ * @see https://developer.chrome.com/extensions/passwordsPrivate#method-removePasswordException
+ */
+chrome.passwordsPrivate.removePasswordException = function(exceptionUrl) {};
+
+/**
+ * Returns the plaintext password corresponding to |loginPair|. Note that on
+ * some operating systems, this call may result in an OS-level reauthentication.
+ * @param {LoginPair} loginPair The LoginPair corresponding to the entry whose
+ * password is to be returned.
+ * @param {function(string):void} callback Callback which will be passed the
+ * plaintext password.
+ * @see https://developer.chrome.com/extensions/passwordsPrivate#method-getPlaintextPassword
+ */
+chrome.passwordsPrivate.getPlaintextPassword = function(loginPair, callback) {};
+
+/**
+ * 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.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/passwordsPrivate#event-onSavedPasswordsListChanged
+ */
+chrome.passwordsPrivate.onSavedPasswordsListChanged;
+
+/**
+ * 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.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/passwordsPrivate#event-onPasswordExceptionsListChanged
+ */
+chrome.passwordsPrivate.onPasswordExceptionsListChanged;
+
+