aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed-single.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/mozilla-embed-single.cpp')
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 447f3b4ff..f0675d355 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -36,6 +36,7 @@
#include "glib.h"
#include "ephy-debug.h"
#include "gtkmozembed.h"
+#include "gtkmozembed_internal.h"
#include "mozilla-embed.h"
#include "ephy-file-helpers.h"
#include "mozilla-notifiers.h"
@@ -72,6 +73,10 @@
#include <nsILocalFile.h>
#include <nsIURI.h>
+#ifdef HAVE_MOZILLA_TOOLKIT
+#include "EphyDirectoryProvider.h"
+#endif
+
#ifdef HAVE_MOZILLA_PSM
#include <nsIX509Cert.h>
#include <nsIX509CertDB.h>
@@ -528,6 +533,20 @@ init_services (MozillaEmbedSingle *single)
/* Set mozilla binary path */
gtk_moz_embed_set_comp_path (MOZILLA_HOME);
+#ifdef HAVE_MOZILLA_TOOLKIT
+ EphyDirectoryProvider *dirProvider = new EphyDirectoryProvider ();
+ if (!dirProvider) return FALSE;
+
+ NS_ADDREF (dirProvider);
+ nsCOMPtr<nsIDirectoryServiceProvider> dp (do_QueryInterface (dirProvider));
+ NS_RELEASE (dirProvider);
+
+ if (!dp) return FALSE;
+
+ gtk_moz_embed_set_directory_service_provider (dp);
+ dp = nsnull;
+#endif
+
/* Fire up the beast */
gtk_moz_embed_push_startup ();