Visit Mozilla.org

nsIDownloadManagerUI

From MDC

This article covers features introduced in Firefox 3

The nsIDownloadManagerUI interface is used to implement the user interface for the Download Manager. If you wish to replace the default Download Manager user interface, implement this interface.

Contents

nsIDownloadManagerUI is defined in toolkit/components/downloads/public/nsIDownloadManagerUI.idl. It is scriptable and unfrozen (hasn't changed since Mozilla 1.9).

Inherits from: nsISupports

[edit] Method overview

void getAttention();
void show([optional] in nsIInterfaceRequestor aWindowContext, [optional] in unsigned long aID, [optional] in short aReason);

[edit] Attributes

Attribute Type Description
visible boolean This read-only attribute is true if the Download Manager UI is visible; otherwise it returns false.

[edit] Constants

Constant Value Description
REASON_USER_INTERACTED 0 When opening the Download Manager user interface, this value indicates that it's being done at the user's request.
REASON_NEW_DOWNLOAD 1 When opening the Download Manager user interface, this value indicates that the user interface is being displayed because a new download is being started.

[edit] Methods

[edit] getAttention()

Calls attention to the Download Manager's user interface if it's already visible.

 void getAttention();
[edit] Parameters

None.

[edit] Exceptions thrown
NS_ERROR_UNEXPECTED
The user interface isn't currently visible.

[edit] show()

Shows the Download Manager's user interface to the user.

 void show(
   [optional] in nsIInterfaceRequestor aWindowContext,
   [optional] in unsigned long aID,
   [optional] in short aReason
 );
[edit] Parameters
aWindowContext
The parent window context to show the user interface. With this information, it's possible to put the Download Manager in a tab in the same window as the parent.
aID
The ID of the download to be preselected upon opening the Download Manager UI.
aReason
One of the reason constants indicating why the user interface should be displayed.

[edit] See also