michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: interface nsIInterfaceRequestor; michael@0: interface nsIDownload; michael@0: michael@0: [scriptable, uuid(0c76d4cf-0b06-4c1a-9bea-520c7bbdba99)] michael@0: interface nsIDownloadManagerUI : nsISupports { michael@0: /** michael@0: * The reason that should be passed when the user requests to show the michael@0: * download manager's UI. michael@0: */ michael@0: const short REASON_USER_INTERACTED = 0; michael@0: michael@0: /** michael@0: * The reason that should be passed to the show method when we are displaying michael@0: * the UI because a new download is being added to it. michael@0: */ michael@0: const short REASON_NEW_DOWNLOAD = 1; michael@0: michael@0: /** michael@0: * Shows the Download Manager's UI to the user. michael@0: * michael@0: * @param [optional] aWindowContext michael@0: * The parent window context to show the UI. michael@0: * @param [optional] aDownload michael@0: * The download to be preselected upon opening. michael@0: * @param [optional] aReason michael@0: * The reason to show the download manager's UI. This defaults to michael@0: * REASON_USER_INTERACTED, and should be one of the previously listed michael@0: * constants. michael@0: * @param [optional] aUsePrivateUI michael@0: * Pass true as this argument to hint to the implementation that it michael@0: * should only display private downloads in the UI, if possible. michael@0: */ michael@0: void show([optional] in nsIInterfaceRequestor aWindowContext, michael@0: [optional] in nsIDownload aDownload, michael@0: [optional] in short aReason, michael@0: [optional] in boolean aUsePrivateUI); michael@0: michael@0: /** michael@0: * Indicates if the UI is visible or not. michael@0: */ michael@0: readonly attribute boolean visible; michael@0: michael@0: /** michael@0: * Brings attention to the UI if it is already visible michael@0: * michael@0: * @throws NS_ERROR_UNEXPECTED if the UI is not visible. michael@0: */ michael@0: void getAttention(); michael@0: }; michael@0: