forked from mirrors/gecko-dev
37 lines
1.6 KiB
Text
37 lines
1.6 KiB
Text
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
webidl BrowsingContext;
|
|
webidl Credential;
|
|
|
|
interface nsICredentialChosenCallback;
|
|
|
|
[scriptable, uuid(673ddc19-03e2-4b30-a868-06297e8fed89)]
|
|
interface nsICredentialChooserService : nsISupports {
|
|
/**
|
|
* Show UI to allow the user to make a choice between credentials
|
|
*
|
|
* @param browsingContext The top-level browsing context of the context requesting a credential.
|
|
* @param credentials The Credential objects the user should choose from
|
|
* @param callback A callback to notify when the user makes a choice
|
|
*/
|
|
void showCredentialChooser(in BrowsingContext browsingContext, in Array<Credential> credentials, in nsICredentialChosenCallback callback);
|
|
/**
|
|
* Dismiss the credential chooser UI
|
|
*
|
|
* @param browsingContext The top-level browsing context of the context requesting a credential.
|
|
*/
|
|
void cancelCredentialChooser(in BrowsingContext browsingContext);
|
|
|
|
/**
|
|
* A test helper that allows us to make decisions about which credentials to use without showing any UI.
|
|
* This must be called before showCredentialChooser with the same browsing context.
|
|
*
|
|
* @param browsingContext The top browsing context of the window calling the Credential Management API
|
|
* @param id The id to be used in place of user choice when showCredentialChooser is called
|
|
*/
|
|
void testMakeChoice(in BrowsingContext browsingContext, in AUTF8String id);
|
|
};
|