On Saturday, August 3, 2013 8:21:57 AM UTC-4, Paolo Amadini wrote: > Hello, > > > > if you are maintaining an add-on or a Mozilla product that interacts > > with downloads, you should look into updating your code to use the new > > Downloads.jsm module instead of nsIDownloadManager as soon as possible. > > > > While other Mozilla products may migrate at different times, Firefox > > for Desktop will do so starting from version 26, meaning that add-ons > > that use methods of nsIDownloadManager will no longer be compatible > > unless updated. Firefox 26 will reach the Beta channel on October 29th, > > and will go to release on December 10th, 2013. > > > > *Overview* > > > > We have been working on this new module over the past few months, with > > the goal of eliminating any temporary unresponsiveness that could be > > observed when downloads are started, as well as making the browser more > > responsive in general while there are downloads in progress. > > > > To make this possible, we removed all access to the "downloads.sqlite" > > database, replacing it with an in-memory representation of the state > > of current downloads. In Firefox for Desktop, the history of past > > downloads is handled separately, using the "places.sqlite" database. > > > > *Changes* > > > > The new API is fully asynchronous and works somewhat differently from > > the old one. It has the advantage of being designed for JavaScript from > > the start, and is much simpler than the old XPCOM API. In particular, > > listing and handling current downloads may be done using JavaScript > > objects, without any special code for database access. > > > > The complete documentation of the module can be found here: > > > > https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Downloads.jsm > > > > We may still update existing methods to address specific needs or > > new requirements, but the general mechanisms will remain the same. > > > > *Testing* > > > > A new about:config preference named "browser.download.useJSTransfer" > > enables the browser and the Downloads Panel to use the Downloads.jsm > > module instead of nsIDownloadManager as the back-end. The browser must > > be restarted for the preference to take effect. > > > > Support for this preference will be available in Nightly today or > > tomorrow. This means that it will be ready for testing in the Aurora > > channel starting from version 25, on August 8th. > > > > In the Firefox 26 release train, nsIDownloadManager will not be used > > anymore. The preference will be removed and there will be no way to > > revert to the old system that caused potential performance issues. > > We will finally be able to remove a lot of front-end code that is > > complex to maintain and only needed for backwards compatibility. > > > > *Feedback* > > > > The version of the module in Firefox 25 is still in development, and > > while the interface is complete, some features like restoring downloads > > after a restart and the related prompts are not implemented yet. The > > remaining work is tracked with dependencies of bug 847863: > > > > https://bugzilla.mozilla.org/showdependencytree.cgi?id=847863&hide_resolved=1 > > > > If you notice any unexpected behavior with the new preference that is > > not already listed there, feel free to file a new bug and mark it as > > blocking bug 847863. For any other question or need, feel free to > > reply to this thread in the relevant list (extensions or platform), > > or contact myself directly. Any relevant information emerging from > > the discussion will be summarized in a new project update. > > > > Cheers, > > Paolo
I am trying to use the new module. It works fine in terms of downloading the file but how can I send the download to Firefox download manager so that user can see the progress same as normal downloads? _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform