aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed-persist.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-05-11 02:07:03 +0800
committerChristian Persch <chpe@src.gnome.org>2006-05-11 02:07:03 +0800
commit24b71aa8ac7de8dd140092705bb7cc439f6b3309 (patch)
tree65631a3c5c3b28414788e1f9ef060962b95de9a1 /embed/mozilla/mozilla-embed-persist.cpp
parentc3a7867c638dd105405fa2078b2de828a318b909 (diff)
downloadgsoc2013-epiphany-24b71aa8ac7de8dd140092705bb7cc439f6b3309.tar
gsoc2013-epiphany-24b71aa8ac7de8dd140092705bb7cc439f6b3309.tar.gz
gsoc2013-epiphany-24b71aa8ac7de8dd140092705bb7cc439f6b3309.tar.bz2
gsoc2013-epiphany-24b71aa8ac7de8dd140092705bb7cc439f6b3309.tar.lz
gsoc2013-epiphany-24b71aa8ac7de8dd140092705bb7cc439f6b3309.tar.xz
gsoc2013-epiphany-24b71aa8ac7de8dd140092705bb7cc439f6b3309.tar.zst
gsoc2013-epiphany-24b71aa8ac7de8dd140092705bb7cc439f6b3309.zip
Drop support for gecko 1.7.
2006-05-10 Christian Persch <chpe@cvs.gnome.org> * configure.ac: * data/glade/prefs-dialog.glade: * embed/ephy-favicon-cache.c: (ephy_favicon_cache_get): * embed/mozilla/AutoJSContextStack.cpp: * embed/mozilla/ContentHandler.cpp: * embed/mozilla/ContentHandler.h: * embed/mozilla/EphyAboutModule.cpp: * embed/mozilla/EphyAboutModule.h: * embed/mozilla/EphyBrowser.cpp: * embed/mozilla/EphyBrowser.h: * embed/mozilla/EphyContentPolicy.cpp: * embed/mozilla/EphyContentPolicy.h: * embed/mozilla/EphyDirectoryProvider.cpp: * embed/mozilla/EphyFind.cpp: * embed/mozilla/EphyFind.h: * embed/mozilla/EphyHeaderSniffer.cpp: * embed/mozilla/EphyHeaderSniffer.h: * embed/mozilla/EphyHistoryListener.cpp: * embed/mozilla/EphyHistoryListener.h: * embed/mozilla/EphyPromptService.cpp: * embed/mozilla/EphySidebar.cpp: * embed/mozilla/EphySidebar.h: * embed/mozilla/EphySingle.cpp: * embed/mozilla/EphySingle.h: * embed/mozilla/EphyUtils.cpp: * embed/mozilla/EphyUtils.h: * embed/mozilla/EventContext.cpp: * embed/mozilla/EventContext.h: * embed/mozilla/FilePicker.cpp: * embed/mozilla/FilePicker.h: * embed/mozilla/GlobalHistory.cpp: * embed/mozilla/GlobalHistory.h: * embed/mozilla/GtkNSSClientAuthDialogs.cpp: * embed/mozilla/GtkNSSDialogs.cpp: * embed/mozilla/GtkNSSKeyPairDialogs.cpp: * embed/mozilla/GtkNSSSecurityWarningDialogs.cpp: * embed/mozilla/GtkNSSSecurityWarningDialogs.h: * embed/mozilla/Makefile.am: * embed/mozilla/MozDownload.cpp: * embed/mozilla/MozDownload.h: * embed/mozilla/MozRegisterComponents.cpp: * embed/mozilla/MozRegisterComponents.h: * embed/mozilla/MozillaPrivate.cpp: * embed/mozilla/MozillaPrivate.h: * embed/mozilla/PrintingPromptService.cpp: * embed/mozilla/PrintingPromptService.h: * embed/mozilla/mozilla-download.cpp: * embed/mozilla/mozilla-download.h: * embed/mozilla/mozilla-embed-event.cpp: * embed/mozilla/mozilla-embed-event.h: * embed/mozilla/mozilla-embed-find.cpp: * embed/mozilla/mozilla-embed-find.h: * embed/mozilla/mozilla-embed-persist.cpp: * embed/mozilla/mozilla-embed-persist.h: * embed/mozilla/mozilla-embed-single.cpp: * embed/mozilla/mozilla-embed.cpp: * embed/mozilla/mozilla-embed.h: * embed/mozilla/mozilla-notifiers.cpp: * embed/mozilla/mozilla-notifiers.h: * embed/mozilla/mozilla-x509-cert.cpp: * embed/mozilla/mozilla-x509-cert.h: * lib/ephy-gui.c: * lib/ephy-gui.h: * lib/ephy-langs.c: * m4/gecko.m4: * src/ephy-window.c: (sync_tab_security): * src/prefs-dialog.c: (prefs_dialog_init): Drop support for gecko 1.7.
Diffstat (limited to 'embed/mozilla/mozilla-embed-persist.cpp')
-rw-r--r--embed/mozilla/mozilla-embed-persist.cpp71
1 files changed, 34 insertions, 37 deletions
diff --git a/embed/mozilla/mozilla-embed-persist.cpp b/embed/mozilla/mozilla-embed-persist.cpp
index 990ed0fbd..63ded311c 100644
--- a/embed/mozilla/mozilla-embed-persist.cpp
+++ b/embed/mozilla/mozilla-embed-persist.cpp
@@ -19,32 +19,43 @@
*/
#include "mozilla-config.h"
-
#include "config.h"
-#include "mozilla-embed-persist.h"
-#include "mozilla-embed.h"
-#include "ephy-embed-shell.h"
-#include "ephy-file-helpers.h"
-#include "EphyBrowser.h"
-#include "EphyHeaderSniffer.h"
-#include "MozDownload.h"
-#include "EphyUtils.h"
-#include "ephy-debug.h"
-
#include <stddef.h>
-#include <nsIWebBrowserPersist.h>
+#include <nsStringAPI.h>
+
+#include <nsCOMPtr.h>
+#include <nsComponentManagerUtils.h>
#include <nsCWebBrowserPersist.h>
-#include <nsIHistoryEntry.h>
-#include <nsISHEntry.h>
+#include <nsICacheEntryDescriptor.h>
+#include <nsICacheService.h>
+#include <nsICacheSession.h>
#include <nsIDOMSerializer.h>
+#include <nsIFile.h>
+#include <nsIHistoryEntry.h>
+#include <nsIInputStream.h>
#include <nsIIOService.h>
+#include <nsILocalFile.h>
+#include <nsISHEntry.h>
+#include <nsIURI.h>
+#include <nsIWebBrowserPersist.h>
#include <nsNetCID.h>
#include <nsNetError.h>
-#include <nsICacheEntryDescriptor.h>
-#include <nsICacheService.h>
-#include <nsICacheSession.h>
+#include <nsServiceManagerUtils.h>
+#include <nsXPCOM.h>
+
+#include "EphyBrowser.h"
+#include "EphyHeaderSniffer.h"
+#include "EphyUtils.h"
+#include "MozDownload.h"
+
+#include "ephy-debug.h"
+#include "ephy-embed-shell.h"
+#include "ephy-file-helpers.h"
+#include "mozilla-embed.h"
+
+#include "mozilla-embed-persist.h"
static void
mozilla_embed_persist_class_init (MozillaEmbedPersistClass *klass);
@@ -127,18 +138,11 @@ impl_cancel (EphyEmbedPersist *persist)
{
nsCOMPtr<nsIWebBrowserPersist> bpersist =
MOZILLA_EMBED_PERSIST (persist)->priv->mPersist;
-#ifdef HAVE_GECKO_1_8
nsCOMPtr<nsICancelable> cancelable (do_QueryInterface (bpersist));
if (cancelable)
{
cancelable->Cancel (NS_BINDING_ABORTED);
}
-#else
- if (bpersist)
- {
- bpersist->CancelSave ();
- }
-#endif
g_object_unref (persist);
}
@@ -186,7 +190,7 @@ impl_save (EphyEmbedPersist *persist)
if (uri)
{
/* FIXME: origin charset!! */
- rv = EphyUtils::NewURI (getter_AddRefs(inURI), nsEmbedCString(uri));
+ rv = EphyUtils::NewURI (getter_AddRefs(inURI), nsCString(uri));
NS_ENSURE_SUCCESS (rv, FALSE);
}
else
@@ -260,20 +264,13 @@ impl_save (EphyEmbedPersist *persist)
{
nsCOMPtr<nsICacheEntryDescriptor> descriptor;
- nsEmbedCString spec;
+ nsCString spec;
inURI->GetSpec (spec);
-#ifdef HAVE_GECKO_1_8
rv = cacheSession->OpenCacheEntry
(spec,
nsICache::ACCESS_READ,
PR_FALSE, getter_AddRefs (descriptor));
-#else
- rv = cacheSession->OpenCacheEntry
- (spec.get(),
- nsICache::ACCESS_READ,
- PR_FALSE, getter_AddRefs (descriptor));
-#endif
cacheDescriptor = do_QueryInterface (descriptor);
@@ -302,7 +299,7 @@ impl_save (EphyEmbedPersist *persist)
nsCOMPtr<nsILocalFile> tmpFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID);
NS_ENSURE_TRUE (tmpFile, FALSE);
- tmpFile->InitWithNativePath (nsEmbedCString (tmp_filename));
+ tmpFile->InitWithNativePath (nsCString (tmp_filename));
g_free (tmp_filename);
/* Create an header sniffer and do the save */
@@ -323,7 +320,7 @@ impl_save (EphyEmbedPersist *persist)
{
/* Filename to save to */
nsCOMPtr<nsILocalFile> destFile;
- NS_NewNativeLocalFile (nsEmbedCString(filename),
+ NS_NewNativeLocalFile (nsCString(filename),
PR_TRUE, getter_AddRefs(destFile));
NS_ENSURE_TRUE (destFile, FALSE);
@@ -369,11 +366,11 @@ impl_to_string (EphyEmbedPersist *persist)
rv = browser->GetTargetDocument (getter_AddRefs(DOMDocument));
}
- nsEmbedCString cOutString;
+ nsCString cOutString;
nsCOMPtr<nsIDOMNode> node = do_QueryInterface(DOMDocument);
if (node)
{
- nsEmbedString outString;
+ nsString outString;
nsCOMPtr<nsIDOMSerializer> serializer;
serializer = do_CreateInstance(NS_XMLSERIALIZER_CONTRACTID, &rv);
if (serializer)