toolkit/components/downloads/nsIDownloadManagerUI.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial