B2G/gecko/browser/components/downloads/src/DownloadsCommon.jsm
/**
   * Starts receiving events for current downloads.
   *
   * @param aDownloadManagerService
   *        Reference to the service implementing nsIDownloadManager.  We need
   *        this because getService isn't available for us when this method is
   *        called, and we must ensure to register our listeners before the
   *        getService call for the Download Manager returns.
   */
Starts receiving events for current downloads.
@param aDownloadManagerService
Reference to the service implementing nsIDownloadManager.  We need
this because getService isn't available for us when this method is
called, and we must ensure to register our listeners before the
getService call for the Download Manager returns.
Starts receiving events for current downloads . @param aDownloadManagerService Reference to the service implementing nsIDownloadManager . We need this because getService isn ' t available for us when this method is called and we must ensure to register our listeners before the getService call for the Download Manager returns .
function DD_initializeDataLink(aDownloadManagerService)
  {
    aDownloadManagerService.addListener(this);
    Services.obs.addObserver(this, "download-manager-remove-download", false);
    Services.obs.addObserver(this, "download-manager-database-type-changed",
                             false);
  }
function DD_initializeDataLink ( aDownloadManagerService ) { aDownloadManagerService . addListener ( this ) ; Services . obs . addObserver ( this , "download-manager-remove-download" , false ) ; Services . obs . addObserver ( this , "download-manager-database-type-changed" , false ) ; }
Starts receiving events for current downloads.
Starts receiving events for current downloads .
// Start receiving real-time events.