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:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-10-27 20:18:49 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-10-27 20:18:49 (GMT)
commit45287c880c4a62b6a5b9da4d8fe34bbee801ff1e (patch)
tree5b40901b14d3a6b9aecff4574a5cf21e651a7c8c /lib/src/SugarContentHandler.cpp
parenta95355c860a8cd28029a8f50b30b5a88f83744e1 (diff)
parentf1949d4672091daad1492f5c7a4d72b03db8142b (diff)
Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
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;
+}
+