From 48e8a2fc2d439ac02dcf85a33db4f78c236372c6 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Tue, 16 Nov 2004 22:38:52 +0000 Subject: More cruft exorcised. 2004-11-16 Christian Persch * embed/mozilla/ContentHandler.cpp: * embed/mozilla/ContentHandler.h: More cruft exorcised. --- embed/mozilla/ContentHandler.cpp | 35 ++++------------------------------- embed/mozilla/ContentHandler.h | 4 ---- 2 files changed, 4 insertions(+), 35 deletions(-) (limited to 'embed') diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp index dd8da8d23..3b3905d70 100644 --- a/embed/mozilla/ContentHandler.cpp +++ b/embed/mozilla/ContentHandler.cpp @@ -182,31 +182,6 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile( } } -NS_METHOD GContentHandler::LaunchHelperApp (void) -{ - nsCOMPtr helperService; - - helperService = do_GetService (NS_EXTERNALHELPERAPPSERVICE_CONTRACTID); - NS_ENSURE_TRUE (helperService, NS_ERROR_FAILURE); - - nsCOMPtr appLauncher = do_QueryInterface (helperService); - NS_ENSURE_TRUE (appLauncher, NS_ERROR_FAILURE); - appLauncher->DeleteTemporaryFileOnExit(mTempFile); - - GList *params = NULL; - char *param; - - param = gnome_vfs_make_uri_canonical (mUrl.get()); - params = g_list_append (params, param); - gnome_vfs_mime_application_launch (mHelperApp, params); - g_free (param); - g_list_free (params); - - mLauncher->Cancel(); - - return NS_OK; -} - NS_METHOD GContentHandler::Init (void) { nsresult rv; @@ -223,13 +198,11 @@ NS_METHOD GContentHandler::Init (void) rv = MIMEInfo->GetMIMEType (&mMimeType); #endif - mLauncher->GetTargetFile (getter_AddRefs(mTempFile)); - - mLauncher->GetSource (getter_AddRefs(mUri)); - NS_ENSURE_TRUE (mUri, NS_ERROR_FAILURE); + nsCOMPtr uri; + mLauncher->GetSource (getter_AddRefs(uri)); + NS_ENSURE_TRUE (uri, NS_ERROR_FAILURE); - rv = mUri->GetSpec (mUrl); - rv = mUri->GetScheme (mScheme); + uri->GetSpec (mUrl); return NS_OK; } diff --git a/embed/mozilla/ContentHandler.h b/embed/mozilla/ContentHandler.h index 0f0378d79..06698ba22 100644 --- a/embed/mozilla/ContentHandler.h +++ b/embed/mozilla/ContentHandler.h @@ -67,14 +67,11 @@ class GContentHandler : public nsIHelperAppLauncherDialog private: NS_METHOD Init (); - NS_METHOD LaunchHelperApp (); NS_METHOD MIMEConfirmAction (); NS_METHOD MIMEDoAction (); nsCOMPtr mLauncher; - nsCOMPtr mUri; - nsCOMPtr mTempFile; nsCOMPtr mContext; PRBool mAppSupportScheme; @@ -83,7 +80,6 @@ class GContentHandler : public nsIHelperAppLauncherDialog EphyMimePermission mPermission; nsEmbedCString mUrl; - nsEmbedCString mScheme; #ifdef MOZ_NSIMIMEINFO_NSACSTRING_ nsEmbedCString mMimeType; #else -- cgit v1.2.3