toolkit/components/passwordmgr/nsILoginManagerPrompter.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "nsISupports.idl"
     8 interface nsILoginInfo;
     9 interface nsIDOMWindow;
    11 [scriptable, uuid(68b3cb59-51b8-4c57-bd7f-b2ce955a593d)]
    13 interface nsILoginManagerPrompter : nsISupports {
    14     /**
    15      * Initialize the prompter. Must be called before using other interfaces.
    16      *
    17      * @param aWindow
    18      *        The in which the user is doing some login-related action that's
    19      *        resulting in a need to prompt them for something. The prompt
    20      *        will be associated with this window (or, if a notification bar
    21      *        is being used, topmost opener in some cases).
    22      */
    23     void init(in nsIDOMWindow aWindow);
    25     /**
    26      * Ask the user if they want to save a login (Yes, Never, Not Now)
    27      *
    28      * @param aLogin
    29      *        The login to be saved.
    30      */
    31     void promptToSavePassword(in nsILoginInfo aLogin);
    33     /**
    34      * Ask the user if they want to change a login's password. If the
    35      * user consents, modifyLogin() will be called.
    36      *
    37      * @param aOldLogin
    38      *        The existing login (with the old password).
    39      * @param aNewLogin
    40      *        The new login.
    41      */
    42     void promptToChangePassword(in nsILoginInfo aOldLogin,
    43                                 in nsILoginInfo aNewLogin);
    45     /**
    46      * Ask the user if they want to change the password for one of
    47      * multiple logins, when the caller can't determine exactly which
    48      * login should be changed. If the user consents, modifyLogin() will
    49      * be called.
    50      *
    51      * @param logins
    52      *        An array of existing logins.
    53      * @param count
    54      *        (length of the array)
    55      * @param aNewLogin
    56      *        The new login.
    57      *
    58      * Note: Because the caller does not know the username of the login
    59      *       to be changed, aNewLogin.username and aNewLogin.usernameField
    60      *       will be set (using the user's selection) before modifyLogin()
    61      *       is called.
    62      */
    63     void promptToChangePasswordWithUsernames(
    64             [array, size_is(count)] in nsILoginInfo logins,
    65             in uint32_t count,
    66             in nsILoginInfo aNewLogin);
    67 };
    68 %{C++
    70 #define NS_LOGINMANAGERPROMPTER_CONTRACTID "@mozilla.org/login-manager/prompter/;1"
    72 %}

mercurial