B2G/gecko/browser/components/downloads/src/DownloadsCommon.jsm
/**
   * Displays a new download notification in the most recent browser window, if
   * one is currently available.
   */
Displays a new download notification in the most recent browser window, if
one is currently available.
Displays a new download notification in the most recent browser window if one is currently available .
function DD_notifyNewDownload()
  {
    if (DownloadsCommon.useToolkitUI) {
      return;
    }
    let browserWin = gBrowserGlue.getMostRecentBrowserWindow();
    if (!browserWin) {
      return;
    }
    browserWin.focus();
    if (this.firstDownloadShown) {
      browserWin.DownloadsIndicatorView.showEventNotification();
      return;
    }
    this.firstDownloadShown = true;
    browserWin.DownloadsPanel.showPanel();
  }
function DD_notifyNewDownload ( ) { if ( DownloadsCommon . useToolkitUI ) { return ; } let browserWin = gBrowserGlue . getMostRecentBrowserWindow ( ) ; if ( ! browserWin ) { return ; } browserWin . focus ( ) ; if ( this . firstDownloadShown ) { browserWin . DownloadsIndicatorView . showEventNotification ( ) ; return ; } this . firstDownloadShown = true ; browserWin . DownloadsPanel . showPanel ( ) ; }
Displays a new download notification in the most recent browser window, if
 one is currently available.
Displays a new download notification in the most recent browser window if one is currently available .
// Show the panel in the most recent browser window, if present. // For new downloads after the first one in the session, don't show the // panel automatically, but provide a visible notification in the topmost // browser window, if the status indicator is already visible.