Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/lib/src/SugarContentHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src/SugarContentHandler.cpp')
-rw-r--r--lib/src/SugarContentHandler.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/src/SugarContentHandler.cpp b/lib/src/SugarContentHandler.cpp
new file mode 100644
index 0000000..b39b20b
--- /dev/null
+++ b/lib/src/SugarContentHandler.cpp
@@ -0,0 +1,43 @@
+#include <nsCExternalHandlerService.h>
+#include <nsIFile.h>
+
+#include "sugar-browser-chandler.h"
+#include "SugarDownload.h"
+
+#include "SugarContentHandler.h"
+
+GSugarContentHandler::GSugarContentHandler()
+{
+
+}
+
+GSugarContentHandler::~GSugarContentHandler()
+{
+
+}
+
+NS_IMPL_ISUPPORTS1(GSugarContentHandler, nsIHelperAppLauncherDialog)
+
+NS_IMETHODIMP
+GSugarContentHandler::Show (nsIHelperAppLauncher *aLauncher,
+ nsISupports *aContext,
+ PRUint32 aReason)
+{
+ nsCOMPtr<nsIFile> tmpFile;
+ aLauncher->GetTargetFile(getter_AddRefs(tmpFile));
+
+ aLauncher->SaveToDisk (tmpFile, PR_FALSE);
+
+ return NS_OK;
+}
+
+NS_IMETHODIMP GSugarContentHandler::PromptForSaveToFile(
+ nsIHelperAppLauncher *aLauncher,
+ nsISupports *aWindowContext,
+ const PRUnichar *aDefaultFile,
+ const PRUnichar *aSuggestedFileExtension,
+ nsILocalFile **_retval)
+{
+ return NS_OK;
+}
+