|
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 #include "nsISupports.idl" |
|
6 interface nsIInterfaceRequestor; |
|
7 interface nsIDownload; |
|
8 |
|
9 [scriptable, uuid(0c76d4cf-0b06-4c1a-9bea-520c7bbdba99)] |
|
10 interface nsIDownloadManagerUI : nsISupports { |
|
11 /** |
|
12 * The reason that should be passed when the user requests to show the |
|
13 * download manager's UI. |
|
14 */ |
|
15 const short REASON_USER_INTERACTED = 0; |
|
16 |
|
17 /** |
|
18 * The reason that should be passed to the show method when we are displaying |
|
19 * the UI because a new download is being added to it. |
|
20 */ |
|
21 const short REASON_NEW_DOWNLOAD = 1; |
|
22 |
|
23 /** |
|
24 * Shows the Download Manager's UI to the user. |
|
25 * |
|
26 * @param [optional] aWindowContext |
|
27 * The parent window context to show the UI. |
|
28 * @param [optional] aDownload |
|
29 * The download to be preselected upon opening. |
|
30 * @param [optional] aReason |
|
31 * The reason to show the download manager's UI. This defaults to |
|
32 * REASON_USER_INTERACTED, and should be one of the previously listed |
|
33 * constants. |
|
34 * @param [optional] aUsePrivateUI |
|
35 * Pass true as this argument to hint to the implementation that it |
|
36 * should only display private downloads in the UI, if possible. |
|
37 */ |
|
38 void show([optional] in nsIInterfaceRequestor aWindowContext, |
|
39 [optional] in nsIDownload aDownload, |
|
40 [optional] in short aReason, |
|
41 [optional] in boolean aUsePrivateUI); |
|
42 |
|
43 /** |
|
44 * Indicates if the UI is visible or not. |
|
45 */ |
|
46 readonly attribute boolean visible; |
|
47 |
|
48 /** |
|
49 * Brings attention to the UI if it is already visible |
|
50 * |
|
51 * @throws NS_ERROR_UNEXPECTED if the UI is not visible. |
|
52 */ |
|
53 void getAttention(); |
|
54 }; |
|
55 |