B2G/gecko/browser/components/downloads/src/DownloadsCommon.jsm
/**
   * Adds an object to be notified when the available status data changes.
   * The specified object is initialized with the currently available status.
   *
   * @param aView
   *        DownloadsIndicatorView object to be added.  This reference must be
   *        passed to removeView before termination.
   */
Adds an object to be notified when the available status data changes.
The specified object is initialized with the currently available status.

@param aView
DownloadsIndicatorView object to be added.  This reference must be
passed to removeView before termination.
Adds an object to be notified when the available status data changes . The specified object is initialized with the currently available status . @param aView DownloadsIndicatorView object to be added . This reference must be passed to removeView before termination .
function DID_addView(aView)
  {
    if (this._views.length == 0) {
      DownloadsCommon.data.addView(this);
    }
    this._views.push(aView);
    this.refreshView(aView);
  }
function DID_addView ( aView ) { if ( this . _views . length == 0 ) { DownloadsCommon . data . addView ( this ) ; } this . _views . push ( aView ) ; this . refreshView ( aView ) ; }
Adds an object to be notified when the available status data changes.
Adds an object to be notified when the available status data changes .
// Start receiving events when the first of our views is registered.