B2G/gecko/toolkit/mozapps/downloads/DownloadTaskbarProgress.jsm
/**
   * Update the active window's taskbar indicator with the current state. There
   * are two cases here:
   * 1. If the active window is the download window, then we always update
   *    the taskbar indicator.
   * 2. If the active window isn't the download window, then we update only if
   *    the status is normal or indeterminate. i.e. one or more downloads are
   *    currently progressing or in scan mode. If we aren't, then we clear the
   *    indicator.
   */
Update the active window's taskbar indicator with the current state. There
are two cases here:
1. If the active window is the download window, then we always update
the taskbar indicator.
2. If the active window isn't the download window, then we update only if
the status is normal or indeterminate.
Update the active window ' s taskbar indicator with the current state . There are two cases here : 1 . If the active window is the download window then we always update the taskbar indicator . 2 . If the active window isn ' t the download window then we update only if the status is normal or indeterminate .
function DTPU_updateTaskbar()
  {
    if (!this._activeTaskbarProgress) {
      return;
    }
    if (this._activeWindowIsDownloadWindow ||
        (this._taskbarState == Ci.nsITaskbarProgress.STATE_NORMAL ||
         this._taskbarState == Ci.nsITaskbarProgress.STATE_INDETERMINATE)) {
      this._activeTaskbarProgress.setProgressState(this._taskbarState,
                                                   this._totalTransferred,
                                                   this._totalSize);
    }
    else {
      this._clearTaskbar();
    }
  }
function DTPU_updateTaskbar ( ) { if ( ! this . _activeTaskbarProgress ) { return ; } if ( this . _activeWindowIsDownloadWindow || ( this . _taskbarState == Ci . nsITaskbarProgress . STATE_NORMAL || this . _taskbarState == Ci . nsITaskbarProgress . STATE_INDETERMINATE ) ) { this . _activeTaskbarProgress . setProgressState ( this . _taskbarState , this . _totalTransferred , this . _totalSize ) ; } else { this . _clearTaskbar ( ) ; } }
Update the active window's taskbar indicator with the current state.
Update the active window ' s taskbar indicator with the current state .
// If the active window is not the download manager window, set the state // only if it is normal or indeterminate. // Clear any state otherwise