diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp index adf3313e186..cb5fc87cf4e 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -1154,6 +1154,12 @@ NS_IMETHODIMP nsExternalAppHandler::GetTimeDownloadStarted(PRTime* aTime) return NS_OK; } +NS_IMETHODIMP nsExternalAppHandler::GetContentLength(PRInt64 *aContentLength) +{ + *aContentLength = mContentLength; + return NS_OK; +} + NS_IMETHODIMP nsExternalAppHandler::CloseProgressWindow() { // release extra state... diff --git a/uriloader/exthandler/nsIExternalHelperAppService.idl b/uriloader/exthandler/nsIExternalHelperAppService.idl index 02d3f622b7e..08a7516668f 100644 --- a/uriloader/exthandler/nsIExternalHelperAppService.idl +++ b/uriloader/exthandler/nsIExternalHelperAppService.idl @@ -166,4 +166,9 @@ interface nsIHelperAppLauncher : nsICancelable * Time when the download started */ readonly attribute PRTime timeDownloadStarted; + + /** + * The download content length, or -1 if the length is not available. + */ + readonly attribute PRInt64 contentLength; };