toolkit/components/downloads/nsIDownloadManagerUI.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial