2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2007-08-28 04:10:25 +04:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
interface nsIInterfaceRequestor;
|
|
|
|
|
2012-12-30 05:01:34 +04:00
|
|
|
[scriptable, uuid(bc54ef90-5215-11e2-bcfd-0800200c9a66)]
|
2007-08-28 04:10:25 +04:00
|
|
|
interface nsIDownloadManagerUI : nsISupports {
|
2008-04-03 07:05:22 +04:00
|
|
|
/**
|
|
|
|
* The reason that should be passed when the user requests to show the
|
|
|
|
* download manager's UI.
|
|
|
|
*/
|
|
|
|
const short REASON_USER_INTERACTED = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The reason that should be passed to the show method when we are displaying
|
|
|
|
* the UI because a new download is being added to it.
|
|
|
|
*/
|
|
|
|
const short REASON_NEW_DOWNLOAD = 1;
|
|
|
|
|
2007-08-28 04:10:25 +04:00
|
|
|
/**
|
|
|
|
* Shows the Download Manager's UI to the user.
|
|
|
|
*
|
2008-04-03 07:05:22 +04:00
|
|
|
* @param [optional] aWindowContext
|
2007-08-28 04:10:25 +04:00
|
|
|
* The parent window context to show the UI.
|
2008-04-03 07:05:22 +04:00
|
|
|
* @param [optional] aID
|
2007-08-28 04:10:25 +04:00
|
|
|
* The id of the download to be preselected upon opening.
|
2008-04-03 07:05:22 +04:00
|
|
|
* @param [optional] aReason
|
|
|
|
* The reason to show the download manager's UI. This defaults to
|
|
|
|
* REASON_USER_INTERACTED, and should be one of the previously listed
|
|
|
|
* constants.
|
2012-12-30 05:01:34 +04:00
|
|
|
* @param [optional] aUsePrivateUI
|
|
|
|
* Pass true as this argument to hint to the implementation that it
|
|
|
|
* should only display private downloads in the UI, if possible.
|
2007-08-28 04:10:25 +04:00
|
|
|
*/
|
|
|
|
void show([optional] in nsIInterfaceRequestor aWindowContext,
|
2008-04-03 07:05:22 +04:00
|
|
|
[optional] in unsigned long aID,
|
2012-12-30 05:01:34 +04:00
|
|
|
[optional] in short aReason,
|
|
|
|
[optional] in boolean aUsePrivateUI);
|
2007-08-28 04:10:25 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates if the UI is visible or not.
|
|
|
|
*/
|
|
|
|
readonly attribute boolean visible;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Brings attention to the UI if it is already visible
|
|
|
|
*
|
|
|
|
* @throws NS_ERROR_UNEXPECTED if the UI is not visible.
|
|
|
|
*/
|
|
|
|
void getAttention();
|
|
|
|
};
|
|
|
|
|