From 24619e355a9632293107bda10768b4b5bbc07e49 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Tue, 16 Nov 2004 22:36:10 +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/mozilla') diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp index 1de4579bd..32c887e6c 100644 --- a/embed/mozilla/ContentHandler.cpp +++ b/embed/mozilla/ContentHandler.cpp @@ -179,31 +179,6 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile( } } -NS_METHOD GContentHandler::LaunchHelperApp () -{ - 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 () { nsresult rv; @@ -220,13 +195,11 @@ NS_METHOD GContentHandler::Init () 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 8249cf948..9f11bb67a 100644 --- a/embed/mozilla/ContentHandler.h +++ b/embed/mozilla/ContentHandler.h @@ -68,21 +68,17 @@ class GContentHandler : public nsIHelperAppLauncherDialog private: NS_METHOD Init (); - NS_METHOD LaunchHelperApp (); NS_METHOD MIMEInitiateAction (); NS_METHOD MIMEConfirmAction (); nsCOMPtr mLauncher; - nsCOMPtr mUri; - nsCOMPtr mTempFile; nsCOMPtr mContext; GnomeVFSMimeApplication *mHelperApp; EphyMimePermission mPermission; nsEmbedCString mUrl; - nsEmbedCString mScheme; #ifdef MOZ_NSIMIMEINFO_NSACSTRING_ nsEmbedCString mMimeType; #else -- cgit v1.2.3