From d9dc573025af0bf599f2a6d1096e22dfcb8444ae Mon Sep 17 00:00:00 2001 From: "blakeross%telocity.com" Date: Sun, 17 Mar 2002 21:41:01 +0000 Subject: [PATCH] 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 --- mozilla/allmakefiles.sh | 3 + .../mac/build_scripts/MozillaBuildList.pm | 8 ++ .../ui/progressDlg/nsIProgressDialog.idl | 74 ++----------------- .../ui/progressDlg/nsProgressDialog.js | 20 ++++- mozilla/uriloader/base/MANIFEST_IDL | 1 + mozilla/uriloader/base/Makefile.in | 1 + mozilla/uriloader/base/makefile.win | 1 + .../exthandler/nsExternalHelperAppService.cpp | 63 +++++++--------- mozilla/uriloader/macbuild/uriLoaderIDL.xml | 60 +++++++++++++++ .../resources/content/contentAreaUtils.js | 17 ++--- .../resources/content/tasksOverlay.js | 7 ++ .../resources/content/tasksOverlay.xul | 1 + .../resources/locale/en-US/tasksOverlay.dtd | 3 + mozilla/xpfe/components/Makefile.in | 2 +- mozilla/xpfe/components/build/Makefile.in | 6 ++ mozilla/xpfe/components/build/makefile.win | 5 ++ mozilla/xpfe/components/build/nsModule.cpp | 8 ++ .../download-manager/src/Makefile.in | 4 + mozilla/xpfe/components/macbuild/appcomps.xml | 30 ++++++++ mozilla/xpfe/components/makefile.win | 1 + mozilla/xpinstall/packager/packages-mac | 2 + .../xpinstall/packager/packages-static-unix | 2 + .../xpinstall/packager/packages-static-win | 2 + mozilla/xpinstall/packager/packages-unix | 2 + mozilla/xpinstall/packager/packages-win | 2 + 25 files changed, 207 insertions(+), 118 deletions(-) diff --git a/mozilla/allmakefiles.sh b/mozilla/allmakefiles.sh index cb3e47e8fa2..0d7f799c6fa 100755 --- a/mozilla/allmakefiles.sh +++ b/mozilla/allmakefiles.sh @@ -631,6 +631,9 @@ xpfe/components/bookmarks/Makefile xpfe/components/bookmarks/public/Makefile xpfe/components/bookmarks/src/Makefile xpfe/components/directory/Makefile +xpfe/components/download-manager/Makefile +xpfe/components/download-manager/src/Makefile +xpfe/components/download-manager/public/Makefile xpfe/components/timebomb/Makefile xpfe/components/timebomb/tools/Makefile xpfe/components/regviewer/Makefile diff --git a/mozilla/build/mac/build_scripts/MozillaBuildList.pm b/mozilla/build/mac/build_scripts/MozillaBuildList.pm index fd1025b2d84..a0479ac04e9 100644 --- a/mozilla/build/mac/build_scripts/MozillaBuildList.pm +++ b/mozilla/build/mac/build_scripts/MozillaBuildList.pm @@ -275,6 +275,9 @@ sub InstallComponentFiles() # update notifications InstallResources(":mozilla:xpfe:components:updates:src:MANIFEST", "$components_dir"); + # download manager + InstallResources(":mozilla:xpfe:components:download-manager:src:MANIFEST_COMPONENTS", "$components_dir"); + # embedding UI InstallResources(":mozilla:embedding:components:ui:helperAppDlg:MANIFEST", "$components_dir"); InstallResources(":mozilla:embedding:components:ui:progressDlg:MANIFEST", "$components_dir"); @@ -529,6 +532,8 @@ sub ProcessJarManifests() CreateJarFromManifest(":mozilla:xpfe:communicator:resources:content:mac:jar.mn", $chrome_dir, \%jars); CreateJarFromManifest(":mozilla:xpfe:components:jar.mn", $chrome_dir, \%jars); CreateJarFromManifest(":mozilla:xpfe:components:bookmarks:resources:jar.mn", $chrome_dir, \%jars); + CreateJarFromManifest(":mozilla:xpfe:components:download-manager:resources:jar.mn", $chrome_dir, \%jars); + CreateJarFromManifest(":mozilla:xpfe:components:download-manager:resources:locale:en-US:jar.mn", $chrome_dir, \%jars); CreateJarFromManifest(":mozilla:xpfe:components:prefwindow:resources:content:mac:jar.mn", $chrome_dir, \%jars); CreateJarFromManifest(":mozilla:xpfe:components:prefwindow:resources:locale:en-US:unix:jar.mn", $chrome_dir, \%jars); CreateJarFromManifest(":mozilla:xpfe:components:prefwindow:resources:locale:en-US:win:jar.mn", $chrome_dir, \%jars); @@ -972,6 +977,8 @@ sub BuildClientDist() InstallFromManifest(":mozilla:xpfe:components:regviewer:MANIFEST_IDL", "$distdirectory:idl:"); # autocomplete InstallFromManifest(":mozilla:xpfe:components:autocomplete:public:MANIFEST_IDL", "$distdirectory:idl:"); + # download manager + InstallFromManifest(":mozilla:xpfe:components:download-manager:public:MANIFEST_IDL", "$distdirectory:idl:"); # XPAPPS InstallFromManifest(":mozilla:xpfe:appshell:public:MANIFEST", "$distdirectory:xpfe:"); @@ -1315,6 +1322,7 @@ sub BuildIDLProjects() BuildIDLProject(":mozilla:xpfe:components:timebomb:macbuild:timebombIDL.xml", "tmbm"); BuildIDLProject(":mozilla:xpfe:components:urlbarhistory:macbuild:urlbarhistoryIDL.xml", "urlbarhistory"); BuildIDLProject(":mozilla:xpfe:components:autocomplete:macbuild:AutoCompleteIDL.xml", "autocomplete"); + BuildIDLProject(":mozilla:xpfe:components:download-manager:macbuild:DownloadManagerIDL.xml", "downloadmanager"); BuildIDLProject(":mozilla:xpfe:appshell:macbuild:appshellIDL.xml", "appshell"); diff --git a/mozilla/embedding/components/ui/progressDlg/nsIProgressDialog.idl b/mozilla/embedding/components/ui/progressDlg/nsIProgressDialog.idl index f1bc69808ec..7b1f5df7fc8 100644 --- a/mozilla/embedding/components/ui/progressDlg/nsIProgressDialog.idl +++ b/mozilla/embedding/components/ui/progressDlg/nsIProgressDialog.idl @@ -21,12 +21,9 @@ * Bill Law law@netscape.com */ -#include "nsIWebProgressListener.idl" +#include "nsIDownload.idl" -interface nsIWebBrowserPersist; interface nsIDOMWindow; -interface nsILocalFile; -interface nsIObserver; /* nsIProgressDialog * @@ -50,75 +47,20 @@ interface nsIObserver; */ [scriptable, uuid(88A478B3-AF65-440a-94DC-ED9B154D2990)] -interface nsIProgressDialog : nsIWebProgressListener { +interface nsIProgressDialog : nsIDownload { /** * Open the dialog * * @param aParent Parent window; optional (if null, then * a top-level window is created) - * @param aPersist The stream transfer operation that the dialog is - * to show progress for. This is optional. If - * specified, then the progress dialog will register - * itself as the listener for that object. Otherwise, - * it is the caller's responsibility to connect this - * object to something that sends out the web progress - * notifications. */ - void open( in nsIDOMWindow aParent, in nsIWebBrowserPersist aPersist ); + void open( in nsIDOMWindow aParent ); - /** - * Set starting time to use in elapsed/remaining time calculations; - * this is useful in cases where the download might have started - * prior to the dialog opening; the time is specified as - * milliseconds, according to the convention for the JavaScript Date - * object getTime function; if not specified, this value will default - * to the time at which the progress dialog object is created. - */ - attribute long long startTime; - - /** - * URL of the source of the stream transfer that the dialog is - * displaying the progress of. - */ - attribute nsIURI source; - - /** - * Target of the stream transfer that the dialog is - * displaying the progress of. - */ - attribute nsILocalFile target; - - /** - * Set this attribute to indicate that the dialog is being - * used to display progress prior to opening a downloaded - * file with a helper application. The application string - * specified will appear on the dialog, unless the string - * is empty. This will also cause the "keep this dialog - * open after download" checkbox hidden. - */ - attribute wstring openingWith; - - /** - * Set this attribute to the observer object that will be - * notified when the user presses the Cancel button. The - * observer's "observe" method will be called with: - * aSubject = the nsIProgressDialog - * aTopic = "oncancel" - * aData = "" - */ - attribute nsIObserver observer; - - /** - * The web browser persist object doing the associated I/O. - * May be null. - */ - readonly attribute nsIWebBrowserPersist operation; - - /** - * The dialog object itself. This might be null if the dialog isn't - * open yet, or has been closed. - */ - readonly attribute nsIDOMWindow dialog; + /** + * The dialog object itself. This might be null if the dialog isn't + * open yet, or has been closed. + */ + attribute nsIDOMWindow dialog; }; diff --git a/mozilla/embedding/components/ui/progressDlg/nsProgressDialog.js b/mozilla/embedding/components/ui/progressDlg/nsProgressDialog.js index a243911dfe7..d847da72c83 100644 --- a/mozilla/embedding/components/ui/progressDlg/nsProgressDialog.js +++ b/mozilla/embedding/components/ui/progressDlg/nsProgressDialog.js @@ -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)) { diff --git a/mozilla/uriloader/base/MANIFEST_IDL b/mozilla/uriloader/base/MANIFEST_IDL index 6cf29fcda06..dda9d5c061b 100644 --- a/mozilla/uriloader/base/MANIFEST_IDL +++ b/mozilla/uriloader/base/MANIFEST_IDL @@ -9,3 +9,4 @@ nsIURILoader.idl nsIDocumentLoader.idl nsIWebProgress.idl nsIWebProgressListener.idl +nsIDownload.idl diff --git a/mozilla/uriloader/base/Makefile.in b/mozilla/uriloader/base/Makefile.in index 7aeef0c06f9..d51022f8c34 100644 --- a/mozilla/uriloader/base/Makefile.in +++ b/mozilla/uriloader/base/Makefile.in @@ -54,6 +54,7 @@ XPIDLSRCS = \ nsIURIContentListener.idl \ nsIURILoader.idl \ nsCURILoader.idl \ + nsIDownload.idl \ nsIDocumentLoader.idl \ nsIWebProgress.idl \ nsIWebProgressListener.idl \ diff --git a/mozilla/uriloader/base/makefile.win b/mozilla/uriloader/base/makefile.win index 94ca302bf3e..38138bf7d7e 100644 --- a/mozilla/uriloader/base/makefile.win +++ b/mozilla/uriloader/base/makefile.win @@ -51,6 +51,7 @@ XPIDLSRCS= \ .\nsIDocumentLoader.idl \ .\nsIWebProgress.idl \ .\nsIWebProgressListener.idl \ + .\nsIDownload.idl \ $(NULL) LIBRARY_NAME=uriloaderbase_s diff --git a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp index 0d9cf6ef237..c91253ae40f 100644 --- a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -39,6 +39,7 @@ #include "nsCURILoader.h" #include "nsIWebProgress.h" #include "nsIWebProgressListener.h" +#include "nsIDownload.h" #include "nsReadableUtils.h" // used to manage our in memory data source of helper applications @@ -1384,52 +1385,42 @@ nsresult nsExternalAppHandler::ShowProgressDialog() { // we are back from the helper app dialog (where the user chooses to save or open), but we aren't // done processing the load. in this case, throw up a progress dialog so the user can see what's going on... - nsresult rv = NS_OK; + nsresult rv; + nsCOMPtr local = do_QueryInterface(mFinalFileDestination); - nsCOMPtr progressDlg = do_CreateInstance( "@mozilla.org/progressdialog;1", &rv ); - if (progressDlg) + nsCOMPtr dl = do_CreateInstance("@mozilla.org/download;1", &rv); + if (NS_FAILED(rv)) return rv; + + nsXPIDLString openWith(NS_LITERAL_STRING("")); + nsMIMEInfoHandleAction action = nsIMIMEInfo::saveToDisk; + mMimeInfo->GetPreferredAction(&action); + if (action != nsIMIMEInfo::saveToDisk) { - // Wire up this progress dialog. - progressDlg->SetSource( mSourceUrl ); - progressDlg->SetStartTime( mTimeDownloadStarted ); - progressDlg->SetObserver(this); - nsCOMPtr local = do_QueryInterface(mFinalFileDestination); - progressDlg->SetTarget(local); - - nsMIMEInfoHandleAction action = nsIMIMEInfo::saveToDisk; - mMimeInfo->GetPreferredAction(&action); - if (action != nsIMIMEInfo::saveToDisk) + // Opening with an application; use either description or application file name. + mMimeInfo->GetApplicationDescription(getter_Copies(openWith)); + if (openWith.IsEmpty()) { - // Opening with an application; use either description or application file name. - nsXPIDLString openWith; - mMimeInfo->GetApplicationDescription(getter_Copies(openWith)); - if (openWith.IsEmpty()) + nsCOMPtr appl; + mMimeInfo->GetPreferredApplicationHandler(getter_AddRefs(appl)); + if (appl) { - nsCOMPtr appl; - mMimeInfo->GetPreferredApplicationHandler(getter_AddRefs(appl)); - if (appl) + nsCOMPtr file = do_QueryInterface(appl); + if (file) { - nsCOMPtr file = do_QueryInterface(appl); - if (file) - { - file->GetUnicodeLeafName(getter_Copies(openWith)); - } + file->GetUnicodeLeafName(getter_Copies(openWith)); } } - // Tell progress dialog what we're opening with. - progressDlg->SetOpeningWith(openWith); - } - - // Open the dialog. - rv = progressDlg->Open(nsnull, nsnull); - - if(NS_SUCCEEDED(rv)) - { - // Send notifications to the dialog. - this->SetWebProgressListener(progressDlg); } } + rv = dl->Init(mSourceUrl, local, nsnull, openWith, mTimeDownloadStarted, nsnull); + if (NS_FAILED(rv)) return rv; + + dl->SetObserver(this); + nsCOMPtr listener = do_QueryInterface(dl); + if (listener) + SetWebProgressListener(listener); + return rv; } diff --git a/mozilla/uriloader/macbuild/uriLoaderIDL.xml b/mozilla/uriloader/macbuild/uriLoaderIDL.xml index d4bf1e28c48..2c28f27c710 100644 --- a/mozilla/uriloader/macbuild/uriLoaderIDL.xml +++ b/mozilla/uriloader/macbuild/uriLoaderIDL.xml @@ -790,6 +790,20 @@ Text + + Name + nsIDownload.idl + MacOS + Text + + + + Name + nsIDownload.idl + MacOS + Text + + @@ -842,6 +856,16 @@ nsIExternalProtocolService.idl MacOS + + Name + nsIDownload.idl + MacOS + + + Name + nsIDownload.idl + MacOS + @@ -1581,6 +1605,20 @@ Text + + Name + nsIDownload.idl + MacOS + Text + + + + Name + nsIDownload.idl + MacOS + Text + + @@ -1633,6 +1671,16 @@ nsIExternalProtocolService.idl MacOS + + Name + nsIDownload.idl + MacOS + + + Name + nsIDownload.idl + MacOS + @@ -1703,6 +1751,18 @@ nsIExternalProtocolService.idl MacOS + + headers + Name + nsIDownload.idl + MacOS + + + headers + Name + nsIDownload.idl + MacOS + diff --git a/mozilla/xpfe/communicator/resources/content/contentAreaUtils.js b/mozilla/xpfe/communicator/resources/content/contentAreaUtils.js index 0f5ad2e4fa2..2609fd456fb 100644 --- a/mozilla/xpfe/communicator/resources/content/contentAreaUtils.js +++ b/mozilla/xpfe/communicator/resources/content/contentAreaUtils.js @@ -286,17 +286,8 @@ function foundHeaderInfo(aSniffer, aData) bypassCache : aData.bypassCache }; - // Create persist object and progress dialog, connect them up, and - // initiate download. - var dialog = makeProgressDialog(); var persist = makeWebBrowserPersist(); - dialog.source = makeURL(aData.url); - dialog.target = persistArgs.target; - - // Set up the persist object to do the download/save. - persist.progressListener = dialog; - // Calculate persist flags. const nsIWBP = Components.interfaces.nsIWebBrowserPersist; const flags = nsIWBP.PERSIST_FLAGS_NO_CONVERSION | nsIWBP.PERSIST_FLAGS_REPLACE_EXISTING_FILES; @@ -308,6 +299,9 @@ function foundHeaderInfo(aSniffer, aData) if (shouldDecode) persist.persistFlags &= ~nsIWBP.PERSIST_FLAGS_NO_CONVERSION; + // Create download and initiate it (below) + var dl = Components.classes["@mozilla.org/download;1"].createInstance(Components.interfaces.nsIDownload); + if (isDocument && fp.filterIndex != 1) { // Saving a Document, not a URI: var filesFolder = null; @@ -335,12 +329,11 @@ function foundHeaderInfo(aSniffer, aData) } const kWrapColumn = 80; - - dialog.open(null, persist); + dl.init(aSniffer.uri, persistArgs.target, null, null, null, persist); persist.saveDocument(persistArgs.source, persistArgs.target, filesFolder, persistArgs.contentType, encodingFlags, kWrapColumn); } else { - dialog.open(null, persist); + dl.init(source, persistArgs.target, null, null, null, persist); persist.saveURI(source, persistArgs.postData, persistArgs.target); } } diff --git a/mozilla/xpfe/communicator/resources/content/tasksOverlay.js b/mozilla/xpfe/communicator/resources/content/tasksOverlay.js index 412308422f7..7740eee5f1b 100644 --- a/mozilla/xpfe/communicator/resources/content/tasksOverlay.js +++ b/mozilla/xpfe/communicator/resources/content/tasksOverlay.js @@ -77,6 +77,13 @@ function toHistory() } +function toDownloadManager() +{ + var dlmgr = Components.classes['@mozilla.org/download-manager;1'].getService(); + dlmgr = dlmgr.QueryInterface(Components.interfaces.nsIDownloadManager); + dlmgr.open(window); +} + function toJavaScriptConsole() { toOpenWindowByType("global:console", "chrome://global/content/console.xul"); diff --git a/mozilla/xpfe/communicator/resources/content/tasksOverlay.xul b/mozilla/xpfe/communicator/resources/content/tasksOverlay.xul index 3e9022488e7..99d8c9bdbc2 100644 --- a/mozilla/xpfe/communicator/resources/content/tasksOverlay.xul +++ b/mozilla/xpfe/communicator/resources/content/tasksOverlay.xul @@ -61,6 +61,7 @@ + diff --git a/mozilla/xpfe/communicator/resources/locale/en-US/tasksOverlay.dtd b/mozilla/xpfe/communicator/resources/locale/en-US/tasksOverlay.dtd index bc6423fb31f..ae06d266a51 100644 --- a/mozilla/xpfe/communicator/resources/locale/en-US/tasksOverlay.dtd +++ b/mozilla/xpfe/communicator/resources/locale/en-US/tasksOverlay.dtd @@ -25,6 +25,9 @@ + + + diff --git a/mozilla/xpfe/components/Makefile.in b/mozilla/xpfe/components/Makefile.in index 08fb70b90c6..d41704e63b1 100644 --- a/mozilla/xpfe/components/Makefile.in +++ b/mozilla/xpfe/components/Makefile.in @@ -26,7 +26,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = bookmarks directory filepicker find history search sidebar related regviewer xfer prefwindow shistory timebomb console autocomplete updates urlbarhistory intl resetPref +DIRS = bookmarks directory download-manager filepicker find history search sidebar related regviewer xfer prefwindow shistory timebomb console autocomplete updates urlbarhistory intl resetPref ifdef MOZ_ENABLE_XREMOTE DIRS += xremote diff --git a/mozilla/xpfe/components/build/Makefile.in b/mozilla/xpfe/components/build/Makefile.in index d16b500cc06..d56c78952a9 100644 --- a/mozilla/xpfe/components/build/Makefile.in +++ b/mozilla/xpfe/components/build/Makefile.in @@ -43,6 +43,10 @@ REQUIRES = xpcom \ mork \ widget \ dom \ + downloadmanager \ + uriloader \ + webbrowserpersist \ + progressDlg \ pref \ docshell \ webshell \ @@ -63,6 +67,7 @@ SHARED_LIBRARY_LIBS = \ $(DIST)/lib/$(LIB_PREFIX)autocomplete_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)bookmarks_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)directory_s.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)downloadmanager_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)history_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)appcompintl_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)related_s.$(LIB_SUFFIX) \ @@ -75,6 +80,7 @@ LOCAL_INCLUDES = \ -I$(srcdir)/../autocomplete/src \ -I$(srcdir)/../bookmarks/src \ -I$(srcdir)/../directory \ + -I$(srcdir)/../download-manager/src \ -I$(srcdir)/../history/src \ -I$(srcdir)/../related/src \ -I$(srcdir)/../search/src \ diff --git a/mozilla/xpfe/components/build/makefile.win b/mozilla/xpfe/components/build/makefile.win index 53c1876bb8a..43a98d8ed89 100644 --- a/mozilla/xpfe/components/build/makefile.win +++ b/mozilla/xpfe/components/build/makefile.win @@ -43,9 +43,12 @@ REQUIRES = xpcom \ content \ history \ search \ + progressDlg \ related \ urlbarhistory \ + uriloader \ mozldap \ + webbrowserpersist \ $(NULL) LCFLAGS = -DWIN32_LEAN_AND_MEAN @@ -62,6 +65,7 @@ SUB_LIBRARIES= \ $(DIST)\lib\autocomplete_s.lib \ $(DIST)\lib\bookmarks_s.lib \ $(DIST)\lib\directory_s.lib \ + $(DIST)\lib\downloadmanager_s.lib \ $(DIST)\lib\history_s.lib \ $(DIST)\lib\appcompintl_s.lib \ $(DIST)\lib\related_s.lib \ @@ -88,6 +92,7 @@ INCS = $(INCS) \ -I$(DEPTH)\xpfe\components\autocomplete\src \ -I$(DEPTH)\xpfe\components\bookmarks\src \ -I$(DEPTH)\xpfe\components\directory \ + -I$(DEPTH)\xpfe\components\download-manager\src \ -I$(DEPTH)\xpfe\components\history\src \ -I$(DEPTH)\xpfe\components\related\src \ -I$(DEPTH)\xpfe\components\search\src \ diff --git a/mozilla/xpfe/components/build/nsModule.cpp b/mozilla/xpfe/components/build/nsModule.cpp index 355baef3d85..c42d0bbbe7c 100644 --- a/mozilla/xpfe/components/build/nsModule.cpp +++ b/mozilla/xpfe/components/build/nsModule.cpp @@ -39,6 +39,8 @@ #include "nsAutoComplete.h" #include "nsBookmarksService.h" #include "nsDirectoryViewer.h" +#include "nsDownloadManager.h" +#include "nsDownloadProxy.h" #include "nsGlobalHistory.h" #include "rdf.h" #include "nsTimeBomb.h" @@ -63,6 +65,8 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsAutoCompleteResults) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsBookmarksService, Init) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHTTPIndex, Init) NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirectoryViewerFactory) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDownloadManager, Init) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsDownloadProxy) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGlobalHistory, Init) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(LocalSearchDataSource, Init) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(InternetSearchDataSource, Init) @@ -147,6 +151,10 @@ static const nsModuleComponentInfo components[] = { nsHTTPIndexConstructor }, { "Directory Viewer", NS_HTTPINDEX_SERVICE_CID, NS_HTTPINDEX_DATASOURCE_CONTRACTID, nsHTTPIndexConstructor }, + { "Download Manager", NS_DOWNLOADMANAGER_CID, NS_DOWNLOADMANAGER_CONTRACTID, + nsDownloadManagerConstructor }, + { "Download", NS_DOWNLOAD_CID, NS_DOWNLOAD_CONTRACTID, + nsDownloadProxyConstructor }, { "Global History", NS_GLOBALHISTORY_CID, NS_GLOBALHISTORY_CONTRACTID, nsGlobalHistoryConstructor }, { "Global History", NS_GLOBALHISTORY_CID, NS_GLOBALHISTORY_DATASOURCE_CONTRACTID, diff --git a/mozilla/xpfe/components/download-manager/src/Makefile.in b/mozilla/xpfe/components/download-manager/src/Makefile.in index 557e9d4e5c7..406e4c86d59 100644 --- a/mozilla/xpfe/components/download-manager/src/Makefile.in +++ b/mozilla/xpfe/components/download-manager/src/Makefile.in @@ -45,6 +45,10 @@ CPPSRCS = \ nsDownloadManager.cpp \ $(NULL) +# we don't want the shared lib, but we want to force the creation of a +# static lib. +FORCE_STATIC_LIB = 1 + include $(topsrcdir)/config/rules.mk EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) diff --git a/mozilla/xpfe/components/macbuild/appcomps.xml b/mozilla/xpfe/components/macbuild/appcomps.xml index 2e828de4bed..3612d5e7824 100644 --- a/mozilla/xpfe/components/macbuild/appcomps.xml +++ b/mozilla/xpfe/components/macbuild/appcomps.xml @@ -1054,6 +1054,13 @@ Library Debug + + Name + nsDownloadManager.cpp + MacOS + Text + Debug + @@ -1161,6 +1168,11 @@ UnicharUtilsStaticDebug.o MacOS + + Name + nsDownloadManager.cpp + MacOS + @@ -2164,6 +2176,13 @@ Library + + Name + nsDownloadManager.cpp + MacOS + Text + Debug + @@ -2271,6 +2290,11 @@ UnicharUtilsStatic.o MacOS + + Name + nsDownloadManager.cpp + MacOS + @@ -2342,6 +2366,12 @@ nsUrlbarHistory.cpp MacOS + + AppCompsDebug.shlb + Name + nsDownloadManager.cpp + MacOS + Search diff --git a/mozilla/xpfe/components/makefile.win b/mozilla/xpfe/components/makefile.win index 62b95244f24..0577b3b51af 100644 --- a/mozilla/xpfe/components/makefile.win +++ b/mozilla/xpfe/components/makefile.win @@ -33,6 +33,7 @@ DIRS= \ regviewer \ related \ xfer \ + download-manager \ shistory \ timebomb \ console \ diff --git a/mozilla/xpinstall/packager/packages-mac b/mozilla/xpinstall/packager/packages-mac index 1d71a166749..34cc86928a2 100644 --- a/mozilla/xpinstall/packager/packages-mac +++ b/mozilla/xpinstall/packager/packages-mac @@ -92,6 +92,7 @@ viewer:Components:cookie.xpt viewer:Components:Cookie.shlb viewer:Components:appcomps.shlb viewer:Components:Directory.xpt +viewer:Components:downloadmanager.xpt viewer:Components:docshell.xpt viewer:Components:dom.shlb viewer:Components:dom.xpt @@ -203,6 +204,7 @@ viewer:Components:xmlextras.shlb viewer:Components:xmlsoap.xpt viewer:Components:nsHelperAppDlg.js viewer:Components:nsProgressDialog.js +viewer:Components:nsDownloadProgressListener.js viewer:Components:transformiix.xpt viewer:Components:transformiix.shlb viewer:Components:nsCloseAllWindows.js diff --git a/mozilla/xpinstall/packager/packages-static-unix b/mozilla/xpinstall/packager/packages-static-unix index 1e4add846b0..dcd9626f1ff 100644 --- a/mozilla/xpinstall/packager/packages-static-unix +++ b/mozilla/xpinstall/packager/packages-static-unix @@ -56,6 +56,7 @@ bin/res/cmessage.txt bin/components/bookmarks.xpt bin/components/directory.xpt +bin/components/downloadmanager.xpt bin/components/history.xpt bin/components/timebomb.xpt bin/components/related.xpt @@ -159,6 +160,7 @@ bin/components/nsHelperAppDlg.js bin/components/helperAppDlg.xpt bin/components/nsProgressDialog.js bin/components/progressDlg.xpt +bin/components/nsDownloadProgressListener.js bin/components/transformiix.xpt bin/chrome/help.jar diff --git a/mozilla/xpinstall/packager/packages-static-win b/mozilla/xpinstall/packager/packages-static-win index b86fb9d3bb4..1326abff0d3 100644 --- a/mozilla/xpinstall/packager/packages-static-win +++ b/mozilla/xpinstall/packager/packages-static-win @@ -66,6 +66,7 @@ bin\components\autocomplete.xpt bin\components\bookmarks.xpt bin\components\crypto.dll bin\components\directory.xpt +bin\components\downloadmanager.xpt bin\components\commandhandler.xpt bin\components\history.xpt bin\components\winhooks.xpt @@ -178,6 +179,7 @@ bin\components\nsHelperAppDlg.js bin\components\helperAppDlg.xpt bin\components\nsProgressDialog.js bin\components\progressDlg.xpt +bin\components\nsDownloadProgressListener.js bin\components\transformiix.xpt diff --git a/mozilla/xpinstall/packager/packages-unix b/mozilla/xpinstall/packager/packages-unix index ad2ac727b29..ce13fdec555 100644 --- a/mozilla/xpinstall/packager/packages-unix +++ b/mozilla/xpinstall/packager/packages-unix @@ -67,6 +67,7 @@ bin/libxlibrgb.so bin/components/libappcomps.so bin/components/bookmarks.xpt bin/components/directory.xpt +bin/components/downloadmanager.xpt bin/components/history.xpt bin/components/timebomb.xpt bin/components/related.xpt @@ -243,6 +244,7 @@ bin/components/nsHelperAppDlg.js bin/components/helperAppDlg.xpt bin/components/nsProgressDialog.js bin/components/progressDlg.xpt +bin/components/nsDownloadProgressListener.js bin/components/transformiix.xpt bin/components/libtransformiix.so bin/components/libfileview.so diff --git a/mozilla/xpinstall/packager/packages-win b/mozilla/xpinstall/packager/packages-win index c1deab776bc..7790fb04ef4 100644 --- a/mozilla/xpinstall/packager/packages-win +++ b/mozilla/xpinstall/packager/packages-win @@ -78,6 +78,7 @@ bin\components\appcomps.dll bin\components\autocomplete.xpt bin\components\bookmarks.xpt bin\components\directory.xpt +bin\components\downloadmanager.xpt bin\components\embedcomponents.dll bin\components\commandhandler.xpt bin\components\history.xpt @@ -255,6 +256,7 @@ bin\components\nsHelperAppDlg.js bin\components\helperAppDlg.xpt bin\components\nsProgressDialog.js bin\components\progressDlg.xpt +bin\components\nsDownloadProgressListener.js bin\components\transformiix.xpt bin\components\transformiix.dll bin\ISimpleDOMNodeMarshal.dll