Source code

Revision control

Other Tools

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/. */
4
5
6
#include "nsISupports.idl"
7
8
interface nsILoginInfo;
9
interface nsIDOMWindow;
10
11
webidl Element;
12
13
[scriptable, uuid(425f73b9-b2db-4e8a-88c5-9ac2512934ce)]
14
interface nsILoginManagerAuthPrompter : nsISupports {
15
/**
16
* Initialize the prompter. Must be called before using other interfaces.
17
*
18
* @param aWindow
19
* The window in which the user is doing some login-related action that's
20
* resulting in a need to prompt them for something. The prompt
21
* will be associated with this window (or, if a notification bar
22
* is being used, topmost opener in some cases).
23
*
24
* aWindow can be null if there is no associated window, e.g. in a JSM
25
* or Sandbox. In this case there will be no checkbox to save the login
26
* since the window is needed to know if this is a private context.
27
*
28
* If this window is a content window, the corresponding window and browser
29
* elements will be calculated. If this window is a chrome window, the
30
* corresponding browser element needs to be set using setBrowser.
31
*/
32
void init(in nsIDOMWindow aWindow);
33
34
/**
35
* The browser this prompter is being created for.
36
* This is required if the init function received a chrome window as argument.
37
*/
38
attribute Element browser;
39
40
/**
41
* The opener browser that was used to open the window passed to init.
42
* The opener can be used to determine in which window the prompt
43
* should be shown.
44
*/
45
attribute Element openerBrowser;
46
};
47
%{C++
48
49
#define NS_LOGINMANAGERAUTHPROMPTER_CONTRACTID "@mozilla.org/login-manager/authprompter/;1"
50
51
%}