toolkit/components/downloads/nsIDownloadManagerUI.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/components/downloads/nsIDownloadManagerUI.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,55 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nsISupports.idl"
     1.9 +interface nsIInterfaceRequestor;
    1.10 +interface nsIDownload;
    1.11 +
    1.12 +[scriptable, uuid(0c76d4cf-0b06-4c1a-9bea-520c7bbdba99)]
    1.13 +interface nsIDownloadManagerUI : nsISupports {
    1.14 +  /**
    1.15 +   * The reason that should be passed when the user requests to show the
    1.16 +   * download manager's UI.
    1.17 +   */
    1.18 +  const short REASON_USER_INTERACTED = 0;
    1.19 +
    1.20 +  /**
    1.21 +   * The reason that should be passed to the show method when we are displaying
    1.22 +   * the UI because a new download is being added to it.
    1.23 +   */
    1.24 +  const short REASON_NEW_DOWNLOAD = 1;
    1.25 +
    1.26 + /**
    1.27 +  * Shows the Download Manager's UI to the user.
    1.28 +  *
    1.29 +  * @param [optional] aWindowContext
    1.30 +  *        The parent window context to show the UI.
    1.31 +  * @param [optional] aDownload
    1.32 +  *        The download to be preselected upon opening.
    1.33 +  * @param [optional] aReason
    1.34 +  *        The reason to show the download manager's UI.  This defaults to
    1.35 +  *        REASON_USER_INTERACTED, and should be one of the previously listed
    1.36 +  *        constants.
    1.37 +  * @param [optional] aUsePrivateUI
    1.38 +  *        Pass true as this argument to hint to the implementation that it
    1.39 +  *        should only display private downloads in the UI, if possible.
    1.40 +  */
    1.41 +  void show([optional] in nsIInterfaceRequestor aWindowContext,
    1.42 +            [optional] in nsIDownload aDownload,
    1.43 +            [optional] in short aReason,
    1.44 +            [optional] in boolean aUsePrivateUI);
    1.45 +
    1.46 + /**
    1.47 +  * Indicates if the UI is visible or not.
    1.48 +  */
    1.49 +  readonly attribute boolean visible;
    1.50 +
    1.51 + /**
    1.52 +  * Brings attention to the UI if it is already visible
    1.53 +  *
    1.54 +  * @throws NS_ERROR_UNEXPECTED if the UI is not visible.
    1.55 +  */
    1.56 +  void getAttention();
    1.57 +};
    1.58 +

mercurial