mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
The Mother Of All Download Landings, Phase I
http://bugzilla.mozilla.org/show_bug.cgi?id=214259 Firebird Download System Upgrades. browser/activex/src/control/HelperAppDlg.cpp browser/cocoa/src/CHBrowserService.mm browser/photon/src/nsUnknownContentTypeHanlder.cpp browser/powerplant/source/UDownload.cpp components/ui/helperAppDlg/nsHelperAppDlg.js components/ui/helperAppDlg/nsIHelperAppLauncherDialog.idl tests/mfcembed/components/HelperAppDlg.cpp - Update nsIHelperAppLauncherDialog::PromptForSaveToFile to take a nsIHelperAppLauncher parameter. bug 214985, r=brendan sr=hyatt
This commit is contained in:
parent
ecfebf6684
commit
e2f9fb6a72
@ -472,9 +472,13 @@ CHelperAppLauncherDlg::Show(nsIHelperAppLauncher *aLauncher, nsISupports *aConte
|
||||
}
|
||||
}
|
||||
|
||||
/* nsILocalFile promptForSaveToFile (in nsISupports aWindowContext, in wstring aDefaultFile, in wstring aSuggestedFileExtension); */
|
||||
/* nsILocalFile promptForSaveToFile (in nsIHelperAppLauncher aLauncher, in nsISupports aWindowContext, in wstring aDefaultFile, in wstring aSuggestedFileExtension); */
|
||||
NS_IMETHODIMP
|
||||
CHelperAppLauncherDlg::PromptForSaveToFile(nsISupports *aWindowContext, const PRUnichar *aDefaultFile, const PRUnichar *aSuggestedFileExtension, nsILocalFile **_retval)
|
||||
CHelperAppLauncherDlg::PromptForSaveToFile(nsIHelperAppLauncher *aLauncher,
|
||||
nsISupports *aWindowContext,
|
||||
const PRUnichar *aDefaultFile,
|
||||
const PRUnichar *aSuggestedFileExtension,
|
||||
nsILocalFile **_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
USES_CONVERSION;
|
||||
|
@ -239,7 +239,11 @@ CHBrowserService::Show(nsIHelperAppLauncher* inLauncher, nsISupports* inContext,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CHBrowserService::PromptForSaveToFile(nsISupports *aWindowContext, const PRUnichar *aDefaultFile, const PRUnichar *aSuggestedFileExtension, nsILocalFile **_retval)
|
||||
CHBrowserService::PromptForSaveToFile(nsIHelperAppLauncher* aLauncher,
|
||||
nsISupports *aWindowContext,
|
||||
const PRUnichar *aDefaultFile,
|
||||
const PRUnichar *aSuggestedFileExtension,
|
||||
nsILocalFile **_retval)
|
||||
{
|
||||
NSString* filename = [NSString stringWithPRUnichars:aDefaultFile];
|
||||
NSSavePanel *thePanel = [NSSavePanel savePanel];
|
||||
|
@ -115,7 +115,7 @@ NS_IMETHODIMP nsUnknownContentTypeHandler::Show( nsIHelperAppLauncher *aLauncher
|
||||
}
|
||||
|
||||
/* only Show() method is used - remove this code */
|
||||
NS_IMETHODIMP nsUnknownContentTypeHandler::PromptForSaveToFile( nsISupports * aWindowContext, const PRUnichar * aDefaultFile, const PRUnichar * aSuggestedFileExtension, nsILocalFile ** aNewFile ) {
|
||||
NS_IMETHODIMP nsUnknownContentTypeHandler::PromptForSaveToFile(nsIHelperAppLauncher * aLauncher, nsISupports * aWindowContext, const PRUnichar * aDefaultFile, const PRUnichar * aSuggestedFileExtension, nsILocalFile ** aNewFile ) {
|
||||
/* ATENTIE */ //printf("PromptForSaveToFile!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -291,8 +291,12 @@ NS_IMETHODIMP CHelperAppLauncherDialog::Show(nsIHelperAppLauncher *aLauncher, ns
|
||||
return aLauncher->SaveToDisk(nsnull, PR_FALSE);
|
||||
}
|
||||
|
||||
/* nsILocalFile promptForSaveToFile (in nsISupports aWindowContext, in wstring aDefaultFile, in wstring aSuggestedFileExtension); */
|
||||
NS_IMETHODIMP CHelperAppLauncherDialog::PromptForSaveToFile(nsISupports *aWindowContext, const PRUnichar *aDefaultFile, const PRUnichar *aSuggestedFileExtension, nsILocalFile **_retval)
|
||||
/* nsILocalFile promptForSaveToFile (in nsIHelperAppLauncher aLauncher, in nsISupports aWindowContext, in wstring aDefaultFile, in wstring aSuggestedFileExtension); */
|
||||
NS_IMETHODIMP CHelperAppLauncherDialog::PromptForSaveToFile(nsIHelperAppLauncher* aLauncher,
|
||||
nsISupports *aWindowContext,
|
||||
const PRUnichar *aDefaultFile,
|
||||
const PRUnichar *aSuggestedFileExtension,
|
||||
nsILocalFile **_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
*_retval = nsnull;
|
||||
|
@ -114,7 +114,7 @@ nsHelperAppDialog.prototype = {
|
||||
},
|
||||
|
||||
// promptForSaveToFile: Display file picker dialog and return selected file.
|
||||
promptForSaveToFile: function(aContext, aDefaultFile, aSuggestedFileExtension) {
|
||||
promptForSaveToFile: function(aLauncher, aContext, aDefaultFile, aSuggestedFileExtension) {
|
||||
var result = "";
|
||||
|
||||
// Use file picker to show dialog.
|
||||
|
@ -64,21 +64,23 @@ interface nsILocalFile;
|
||||
|
||||
[scriptable, uuid(d7ebddf0-4c84-11d4-807a-00600811a9c3)]
|
||||
interface nsIHelperAppLauncherDialog : nsISupports {
|
||||
// Show confirmation dialog for launching application (or "save to
|
||||
// disk") for content specified by aLauncher.
|
||||
// aForced is used to indicate whether this dialog was shown even though
|
||||
// the content could have been handled by mozilla; this is used if
|
||||
// an HTTP Server sends Content-Disposition: attachment
|
||||
void show( in nsIHelperAppLauncher aLauncher,
|
||||
in nsISupports aContext,
|
||||
in boolean aForced);
|
||||
// Show confirmation dialog for launching application (or "save to
|
||||
// disk") for content specified by aLauncher.
|
||||
// aForced is used to indicate whether this dialog was shown even though
|
||||
// the content could have been handled by mozilla; this is used if
|
||||
// an HTTP Server sends Content-Disposition: attachment
|
||||
void show(in nsIHelperAppLauncher aLauncher,
|
||||
in nsISupports aContext,
|
||||
in boolean aForced);
|
||||
|
||||
// invoke a save to file dialog instead of the full fledged helper app dialog.
|
||||
// aDefaultFileName --> default file name to provide (can be null)
|
||||
// aSuggestedFileExtension --> sugested file extension
|
||||
// aFileLocation --> return value for the file location
|
||||
nsILocalFile promptForSaveToFile(in nsISupports aWindowContext, in wstring aDefaultFile, in wstring aSuggestedFileExtension );
|
||||
|
||||
nsILocalFile promptForSaveToFile(in nsIHelperAppLauncher aLauncher,
|
||||
in nsISupports aWindowContext,
|
||||
in wstring aDefaultFile,
|
||||
in wstring aSuggestedFileExtension);
|
||||
};
|
||||
|
||||
|
||||
|
@ -256,7 +256,8 @@ NS_IMETHODIMP CHelperAppLauncherDialog::Show(nsIHelperAppLauncher *aLauncher,
|
||||
// We prompt the user for the filename to which the content
|
||||
// will be saved into
|
||||
//
|
||||
NS_IMETHODIMP CHelperAppLauncherDialog::PromptForSaveToFile(nsISupports *aWindowContext,
|
||||
NS_IMETHODIMP CHelperAppLauncherDialog::PromptForSaveToFile(nsIHelperAppLauncher* aLauncher,
|
||||
nsISupports *aWindowContext,
|
||||
const PRUnichar *aDefaultFile,
|
||||
const PRUnichar *aSuggestedFileExtension,
|
||||
nsILocalFile **_retval)
|
||||
|
@ -64,21 +64,23 @@ interface nsILocalFile;
|
||||
|
||||
[scriptable, uuid(d7ebddf0-4c84-11d4-807a-00600811a9c3)]
|
||||
interface nsIHelperAppLauncherDialog : nsISupports {
|
||||
// Show confirmation dialog for launching application (or "save to
|
||||
// disk") for content specified by aLauncher.
|
||||
// aForced is used to indicate whether this dialog was shown even though
|
||||
// the content could have been handled by mozilla; this is used if
|
||||
// an HTTP Server sends Content-Disposition: attachment
|
||||
void show( in nsIHelperAppLauncher aLauncher,
|
||||
in nsISupports aContext,
|
||||
in boolean aForced);
|
||||
// Show confirmation dialog for launching application (or "save to
|
||||
// disk") for content specified by aLauncher.
|
||||
// aForced is used to indicate whether this dialog was shown even though
|
||||
// the content could have been handled by mozilla; this is used if
|
||||
// an HTTP Server sends Content-Disposition: attachment
|
||||
void show(in nsIHelperAppLauncher aLauncher,
|
||||
in nsISupports aContext,
|
||||
in boolean aForced);
|
||||
|
||||
// invoke a save to file dialog instead of the full fledged helper app dialog.
|
||||
// aDefaultFileName --> default file name to provide (can be null)
|
||||
// aSuggestedFileExtension --> sugested file extension
|
||||
// aFileLocation --> return value for the file location
|
||||
nsILocalFile promptForSaveToFile(in nsISupports aWindowContext, in wstring aDefaultFile, in wstring aSuggestedFileExtension );
|
||||
|
||||
nsILocalFile promptForSaveToFile(in nsIHelperAppLauncher aLauncher,
|
||||
in nsISupports aWindowContext,
|
||||
in wstring aDefaultFile,
|
||||
in wstring aSuggestedFileExtension);
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user