2006-10-25 10:18:43 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2006-10-26 15:47:57 +02:00
|
|
|
#include <nsStringAPI.h>
|
|
|
|
#include <nsCExternalHandlerService.h>
|
|
|
|
#include <nsIMIMEInfo.h>
|
|
|
|
#include <nsIURL.h>
|
|
|
|
#include <nsIFile.h>
|
|
|
|
|
|
|
|
#include "sugar-browser-chandler.h"
|
2006-10-26 22:21:26 +02:00
|
|
|
#include "SugarDownload.h"
|
2006-10-26 15:47:57 +02:00
|
|
|
|
2006-10-25 10:18:43 +02:00
|
|
|
#include "sugar-content-handler.h"
|
|
|
|
|
|
|
|
GSugarContentHandler::GSugarContentHandler()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
GSugarContentHandler::~GSugarContentHandler()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMPL_ISUPPORTS1(GSugarContentHandler, nsIHelperAppLauncherDialog)
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GSugarContentHandler::Show (nsIHelperAppLauncher *aLauncher,
|
|
|
|
nsISupports *aContext,
|
|
|
|
PRUint32 aReason)
|
2006-10-26 15:47:57 +02:00
|
|
|
{
|
|
|
|
nsCOMPtr<nsIFile> tmp_file;
|
|
|
|
aLauncher->GetTargetFile(getter_AddRefs(tmp_file));
|
2006-10-26 22:21:26 +02:00
|
|
|
|
|
|
|
aLauncher->SaveToDisk (tmp_file, PR_FALSE);
|
2006-10-25 10:18:43 +02:00
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP GSugarContentHandler::PromptForSaveToFile(
|
|
|
|
nsIHelperAppLauncher *aLauncher,
|
|
|
|
nsISupports *aWindowContext,
|
|
|
|
const PRUnichar *aDefaultFile,
|
|
|
|
const PRUnichar *aSuggestedFileExtension,
|
|
|
|
nsILocalFile **_retval)
|
|
|
|
{
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|