102477 - turn on Download Manager (take 3). r=law sr=ben a=dbaron die=cvs

git-svn-id: svn://10.0.0.236/trunk@116759 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
blakeross%telocity.com
2002-03-17 21:41:01 +00:00
parent 009e7ede52
commit d9dc573025
25 changed files with 207 additions and 118 deletions

View File

@@ -64,6 +64,7 @@ function nsProgressDialog() {
this.mTarget = null;
this.mApp = null;
this.mDialog = null;
this.mDisplayName = null;
this.mPaused = null;
this.mRequest = null;
this.mCompleted = false;
@@ -84,7 +85,7 @@ nsProgressDialog.prototype = {
dialogFeatures: "chrome,titlebar,minimizable=yes",
// getters/setters
get saving() { return this.openingWith == null; },
get saving() { return this.openingWith == null || this.openingWith == ""; },
get parent() { return this.mParent; },
set parent(newval) { return this.mParent = newval; },
get operation() { return this.mOperation; },
@@ -109,6 +110,8 @@ nsProgressDialog.prototype = {
set openingWith(newval) { return this.mApp = newval; },
get dialog() { return this.mDialog; },
set dialog(newval) { return this.mDialog = newval; },
get displayName() { return this.mDisplayName; },
set displayName(newval) { return this.mDisplayName = newval; },
get paused() { return this.mPaused; },
get request() { return this.mRequest; },
get completed() { return this.mCompleted; },
@@ -128,10 +131,9 @@ nsProgressDialog.prototype = {
// ---------- nsIProgressDialog methods ----------
// open: Store aParentWindow and open the dialog.
open: function( aParentWindow, aPersist ) {
open: function( aParentWindow ) {
// Save parent and "persist" operation.
this.parent = aParentWindow;
this.operation = aPersist;
// Open dialog using the WindowWatcher service.
var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
@@ -142,6 +144,17 @@ nsProgressDialog.prototype = {
this.dialogFeatures,
this );
},
init: function( aSource, aTarget, aDisplayName, aOpeningWith, aStartTime, aOperation ) {
this.source = aSource;
this.target = aTarget;
this.displayName = aDisplayName;
this.openingWith = aOpeningWith;
if ( aStartTime ) {
this.startTime = aStartTime;
}
this.operation = aOperation;
},
// ---------- nsIWebProgressListener methods ----------
@@ -307,6 +320,7 @@ nsProgressDialog.prototype = {
// of interface inheritance), nsIObserver, and nsISupports.
QueryInterface: function (iid) {
if (!iid.equals(Components.interfaces.nsIProgressDialog) &&
!iid.equals(Components.interfaces.nsIDownload) &&
!iid.equals(Components.interfaces.nsIWebProgressListener) &&
!iid.equals(Components.interfaces.nsIObserver) &&
!iid.equals(Components.interfaces.nsISupports)) {