diff options
Diffstat (limited to 'embed')
-rw-r--r-- | embed/mozilla/ContentHandler.cpp | 35 | ||||
-rw-r--r-- | embed/mozilla/ContentHandler.h | 4 |
2 files changed, 4 insertions, 35 deletions
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<nsIExternalHelperAppService> helperService; - - helperService = do_GetService (NS_EXTERNALHELPERAPPSERVICE_CONTRACTID); - NS_ENSURE_TRUE (helperService, NS_ERROR_FAILURE); - - nsCOMPtr<nsPIExternalAppLauncher> 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<nsIURI> 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<nsIHelperAppLauncher> mLauncher; - nsCOMPtr<nsIURI> mUri; - nsCOMPtr<nsIFile> mTempFile; nsCOMPtr<nsISupports> mContext; GnomeVFSMimeApplication *mHelperApp; EphyMimePermission mPermission; nsEmbedCString mUrl; - nsEmbedCString mScheme; #ifdef MOZ_NSIMIMEINFO_NSACSTRING_ nsEmbedCString mMimeType; #else |