Warning: The content of this article may be out of date. It was last updated in 2002.
URILoader
tries to find a content listener for the MIME type in question.
URILoader
asks an nsIExternalHelperAppService
to handle the load.
nsExternalHelperAppService
looks up the nsIMIMEInfo
for the load and creates an nsIHelperAppLauncher
to manage the load.
nsExternalAppHandler
(which implements nsIHelperAppLauncher
) uses the nsIMIMEInfo
and an nsIHelperAppLauncherDialog
to decide what to do with the data.
nsExternalAppHandler
does whatever it decided to do.
nsIMIMEInfo
lookup mailcap
/mime.types
on Linux.
nsExternalAppHandler
details nsIStreamListener
.
nsIHelperAppLauncherDialog
in OnStartRequest
.
OnDataAvailable
notifications come in.
nsIMIMEInfo
.
nsExternalAppHandler::OnStartRequest
Show()
on the nsIHelperAppLauncherDialog
, which asynchronously puts up the helper app dialog.
nsExternalAppHandler::OnDataAvailable
nsExternalAppHandler::OnStopRequest
Set a flag that we're done, then do whatever the user wants if the user has decided (save to disk and open in helper are the current options the user has).
This is our implementation of nsIHelperAppLauncherDialog
It calls back to the nsExternalAppHandler
to let it know what the user picked
If a user decides to "save to disk", we just move/copy the temporary file over to the chosen location once the download completes. If an error occurs while we do this we delete the temp file and put up an error dialog.
This is delegated to the nsPIExternalAppLauncher
(also implemented by the nsExternalHelperAppHandler
):
nsIProcess
or via the ::ShellExecute()
method depending on where the MIMEInfo came from. Last-ditch check for executable files here.
LaunchWithDoc()
method on nsILocalFileMac
.
nsIProcess
.
Multiple checks for whether a file is executable (on Windows) to keep from launching such files via ::ShellExecute()
. Checks happen in OnStartRequest
, in the helper app dialog, and as a last ditch in the launching code.
nsIMIMEInfo
nsIMIMEService
API to improve the quality of the MIMEInfo we get.
nsIMIMEInfo
.
mailcap
syntax.