aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog35
-rw-r--r--configure.in5
-rw-r--r--embed/mozilla/ContentHandler.cpp39
-rw-r--r--embed/mozilla/ContentHandler.h20
-rw-r--r--embed/mozilla/EphyAboutRedirector.cpp20
-rw-r--r--embed/mozilla/EphyAboutRedirector.h2
-rw-r--r--embed/mozilla/EphyBrowser.cpp4
-rw-r--r--embed/mozilla/EphyContentPolicy.cpp3
-rw-r--r--embed/mozilla/EphyContentPolicy.h4
-rw-r--r--embed/mozilla/EphyHeaderSniffer.cpp26
-rw-r--r--embed/mozilla/EphyHeaderSniffer.h21
-rw-r--r--embed/mozilla/EphySingle.cpp5
-rw-r--r--embed/mozilla/EventContext.cpp2
-rw-r--r--embed/mozilla/FilePicker.cpp40
-rw-r--r--embed/mozilla/GlobalHistory.cpp5
-rw-r--r--embed/mozilla/GlobalHistory.h3
-rw-r--r--embed/mozilla/GtkNSSClientAuthDialogs.cpp6
-rw-r--r--embed/mozilla/GtkNSSClientAuthDialogs.h3
-rw-r--r--embed/mozilla/GtkNSSDialogs.cpp33
-rw-r--r--embed/mozilla/GtkNSSDialogs.h5
-rw-r--r--embed/mozilla/GtkNSSKeyPairDialogs.cpp13
-rw-r--r--embed/mozilla/GtkNSSKeyPairDialogs.h3
-rw-r--r--embed/mozilla/Makefile.am2
-rw-r--r--embed/mozilla/MozDownload.cpp14
-rw-r--r--embed/mozilla/MozDownload.h29
-rw-r--r--embed/mozilla/mozilla-embed-persist.cpp8
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp22
-rw-r--r--embed/mozilla/mozilla-embed.cpp14
28 files changed, 212 insertions, 174 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ef6a27ee..e809b8a3d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,41 @@
2004-04-29 Marco Pesenti Gritti <marco@gnome.org>
* configure.in:
+ * embed/mozilla/ContentHandler.cpp:
+ * embed/mozilla/ContentHandler.h:
+ * embed/mozilla/EphyAboutRedirector.cpp:
+ * embed/mozilla/EphyAboutRedirector.h:
+ * embed/mozilla/EphyBrowser.cpp:
+ * embed/mozilla/EphyContentPolicy.cpp:
+ * embed/mozilla/EphyContentPolicy.h:
+ * embed/mozilla/EphyHeaderSniffer.cpp:
+ * embed/mozilla/EphyHeaderSniffer.h:
+ * embed/mozilla/EphySingle.cpp:
+ * embed/mozilla/EventContext.cpp:
+ * embed/mozilla/FilePicker.cpp:
+ * embed/mozilla/GlobalHistory.cpp:
+ * embed/mozilla/GlobalHistory.h:
+ * embed/mozilla/GtkNSSClientAuthDialogs.cpp:
+ * embed/mozilla/GtkNSSClientAuthDialogs.h:
+ * embed/mozilla/GtkNSSDialogs.cpp:
+ * embed/mozilla/GtkNSSDialogs.h:
+ * embed/mozilla/GtkNSSKeyPairDialogs.cpp:
+ * embed/mozilla/GtkNSSKeyPairDialogs.h:
+ * embed/mozilla/Makefile.am:
+ * embed/mozilla/MozDownload.cpp:
+ * embed/mozilla/MozDownload.h:
+ * embed/mozilla/mozilla-embed-persist.cpp:
+ * embed/mozilla/mozilla-embed-single.cpp:
+ * embed/mozilla/mozilla-embed.cpp:
+
+ More defines work, still lack EventContext and
+ EmbedPrivate.
+ Use mozilla like warning flags instead of those gnome
+ macros. Remove several unused variables.
+
+2004-04-29 Marco Pesenti Gritti <marco@gnome.org>
+
+ * configure.in:
* embed/mozilla/EphyBrowser.cpp:
* embed/mozilla/EphyBrowser.h:
* embed/mozilla/Makefile.am:
diff --git a/configure.in b/configure.in
index 6598b4b09..1b3b82c5f 100644
--- a/configure.in
+++ b/configure.in
@@ -47,7 +47,6 @@ AC_SUBST(AM_CXXFLAGS)
GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS(error)
-GNOME_CXX_WARNINGS(yes, yes)
PKG_CHECK_MODULES(EPIPHANY_DEPENDENCY, \
glib-2.0 >= $GLIB_REQUIRED \
@@ -73,7 +72,7 @@ AC_SUBST(LIBBONOBO_IDL)
BONOBO_ACTIVATION_IDL="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
AC_SUBST(BONOBO_ACTIVATION_IDL)
-PKG_CHECK_MODULES(MOZILLA_COMPONENT, mozilla-gtkmozembed)
+PKG_CHECK_MODULES(MOZILLA_COMPONENT, mozilla-gtkmozembed mozilla-xpcom)
AC_SUBST(MOZILLA_COMPONENT_CFLAGS)
AC_SUBST(MOZILLA_COMPONENT_LIBS)
@@ -174,6 +173,8 @@ AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/pipnss/nsIX509Cert.h],
[AC_DEFINE(HAVE_MOZILLA_PSM, 1,
[Define if you have the mozilla psm headers installed])])
+MOZILLA_WARN_CXXFLAGS="-Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor"
+AC_SUBST(MOZILLA_WARN_CXXFLAGS)
dnl *******************************
dnl Internationalization
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp
index 489ab72ae..f980c692c 100644
--- a/embed/mozilla/ContentHandler.cpp
+++ b/embed/mozilla/ContentHandler.cpp
@@ -25,25 +25,6 @@
#include "config.h"
#endif
-#include "ContentHandler.h"
-#include "MozillaPrivate.h"
-#include "MozDownload.h"
-
-#include "nsCOMPtr.h"
-#include "nsString.h"
-#include "nsIURL.h"
-#include "nsILocalFile.h"
-#include "nsIMIMEInfo.h"
-#include "nsIInterfaceRequestorUtils.h"
-
-#include "ephy-prefs.h"
-#include "eel-gconf-extensions.h"
-#include "ephy-embed-single.h"
-#include "ephy-embed-shell.h"
-#include "ephy-file-chooser.h"
-#include "ephy-stock-icons.h"
-#include "ephy-debug.h"
-
#include <gtk/gtkimage.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtkvbox.h>
@@ -54,6 +35,24 @@
#include <libgnomevfs/gnome-vfs-utils.h>
#include <glib/gi18n.h>
+#include <nsIURL.h>
+#include <nsILocalFile.h>
+#include <nsIMIMEInfo.h>
+#include <nsIInterfaceRequestorUtils.h>
+#include "nsCExternalHandlerService.h"
+
+#include "ephy-prefs.h"
+#include "ephy-embed-single.h"
+#include "ephy-embed-shell.h"
+#include "ephy-file-chooser.h"
+#include "ephy-stock-icons.h"
+#include "ephy-debug.h"
+#include "eel-gconf-extensions.h"
+
+#include "ContentHandler.h"
+#include "MozillaPrivate.h"
+#include "MozDownload.h"
+
class GContentHandler;
NS_IMPL_ISUPPORTS1(GContentHandler, nsIHelperAppLauncherDialog)
@@ -170,7 +169,6 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile(
NS_METHOD GContentHandler::LaunchHelperApp (void)
{
- nsresult rv;
nsCOMPtr<nsIExternalHelperAppService> helperService;
helperService = do_GetService (NS_EXTERNALHELPERAPPSERVICE_CONTRACTID);
@@ -340,7 +338,6 @@ NS_METHOD GContentHandler::MIMEConfirmAction ()
NS_METHOD GContentHandler::MIMEDoAction (void)
{
- nsresult rv;
gboolean auto_downloads;
if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_SAVE_TO_DISK)) return NS_OK;
diff --git a/embed/mozilla/ContentHandler.h b/embed/mozilla/ContentHandler.h
index 3d850d9c6..834480161 100644
--- a/embed/mozilla/ContentHandler.h
+++ b/embed/mozilla/ContentHandler.h
@@ -24,21 +24,17 @@
#include "ephy-embed-shell.h"
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-#include "nsIHelperAppLauncherDialog.h"
-#include "nsIExternalHelperAppService.h"
-#include "nsCExternalHandlerService.h"
-#include "nsIWebProgressListener.h"
-#include "nsString.h"
-#include "nsIURI.h"
-#include "nsILocalFile.h"
+#include <nsCOMPtr.h>
+#include <nsISupports.h>
+#include <nsIURI.h>
+#include <nsIFile.h>
-#include "nsCRT.h"
-#include "nsWeakReference.h"
+#include <nsIHelperAppLauncherDialog.h>
-#include "nsCOMPtr.h"
-#include "nsISupports.h"
-#include "nsError.h"
+#ifdef ALLOW_PRIVATE_STRINGS
+#include <nsString.h>
+#endif
typedef enum
{
diff --git a/embed/mozilla/EphyAboutRedirector.cpp b/embed/mozilla/EphyAboutRedirector.cpp
index b9f470b44..a7f9fbffe 100644
--- a/embed/mozilla/EphyAboutRedirector.cpp
+++ b/embed/mozilla/EphyAboutRedirector.cpp
@@ -44,14 +44,16 @@
#endif
#include "EphyAboutRedirector.h"
-#include "nsNetCID.h"
-#include "nsIIOService.h"
-#include "nsIServiceManager.h"
-#include "nsCOMPtr.h"
-#include "nsIURI.h"
-#include "nsXPIDLString.h"
-#include "nsString.h"
-#include "plstr.h"
+
+#include <nsNetCID.h>
+#include <nsIIOService.h>
+#include <nsIServiceManager.h>
+#include <nsCOMPtr.h>
+#include <nsIURI.h>
+
+#ifdef ALLOW_PRIVATE_STRINGS
+#include <nsString.h>
+#endif
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
@@ -81,7 +83,7 @@ EphyAboutRedirector::NewChannel(nsIURI *aURI, nsIChannel **result)
for (int i = 0; i< kRedirTotal; i++)
{
- if (!PL_strcasecmp(path.get(), kRedirMap[i].id))
+ if (strcmp(path.get(), kRedirMap[i].id) == 0)
{
nsCOMPtr<nsIChannel> tempChannel;
ioService->NewChannel(nsDependentCString(kRedirMap[i].url),
diff --git a/embed/mozilla/EphyAboutRedirector.h b/embed/mozilla/EphyAboutRedirector.h
index 86207ec1a..ed970c862 100644
--- a/embed/mozilla/EphyAboutRedirector.h
+++ b/embed/mozilla/EphyAboutRedirector.h
@@ -42,7 +42,7 @@
#ifndef EphyAboutRedirector_h__
#define EphyAboutRedirector_h__
-#include "nsIAboutModule.h"
+#include <nsIAboutModule.h>
class EphyAboutRedirector : public nsIAboutModule
{
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index 4b0353c3e..01e0d60ca 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -365,8 +365,6 @@ nsresult EphyBrowser::Destroy ()
nsresult EphyBrowser::GoToHistoryIndex (PRInt16 index)
{
- nsresult result;
-
NS_ENSURE_TRUE (mWebBrowser, NS_ERROR_FAILURE);
nsCOMPtr<nsIWebNavigation> ContentNav = do_QueryInterface (mWebBrowser);
@@ -581,8 +579,6 @@ nsresult EphyBrowser::Find (PRBool backwards,
nsresult EphyBrowser::GetPageDescriptor(nsISupports **aPageDescriptor)
{
- nsresult rv;
-
NS_ENSURE_TRUE (mWebBrowser, NS_ERROR_FAILURE);
nsCOMPtr<nsIDocShell> ds = do_GetInterface (mWebBrowser);
diff --git a/embed/mozilla/EphyContentPolicy.cpp b/embed/mozilla/EphyContentPolicy.cpp
index e84e7d73b..eda29c0ba 100644
--- a/embed/mozilla/EphyContentPolicy.cpp
+++ b/embed/mozilla/EphyContentPolicy.cpp
@@ -37,7 +37,10 @@
#include <nsCOMPtr.h>
#include <nsIURI.h>
+
+#ifdef ALLOW_PRIVATE_STRINGS
#include <nsString.h>
+#endif
#define CONF_LOCKDOWN_DISABLE_UNSAFE_PROTOCOLS "/apps/epiphany/lockdown/disable_unsafe_protocols"
#define CONF_LOCKDOWN_ADDITIONAL_SAFE_PROTOCOLS "/apps/epiphany/lockdown/additional_safe_protocols"
diff --git a/embed/mozilla/EphyContentPolicy.h b/embed/mozilla/EphyContentPolicy.h
index 171fb5c2c..5742f84f8 100644
--- a/embed/mozilla/EphyContentPolicy.h
+++ b/embed/mozilla/EphyContentPolicy.h
@@ -24,8 +24,8 @@
#include <glib.h>
-#include "nsISupports.h"
-#include "nsIContentPolicy.h"
+#include <nsISupports.h>
+#include <nsIContentPolicy.h>
#define EPHY_CONTENT_POLICY_CONTRACTID "@gnome.org/projects/epiphany/epiphany-content-policy;1"
#define EPHY_CONTENT_POLICY_CLASSNAME "Epiphany Content Policy Class"
diff --git a/embed/mozilla/EphyHeaderSniffer.cpp b/embed/mozilla/EphyHeaderSniffer.cpp
index 9ee7d1ce1..3c4073c75 100644
--- a/embed/mozilla/EphyHeaderSniffer.cpp
+++ b/embed/mozilla/EphyHeaderSniffer.cpp
@@ -44,10 +44,8 @@
#endif
#include "MozillaPrivate.h"
-
#include "MozDownload.h"
#include "EphyHeaderSniffer.h"
-#include "netCore.h"
#include "ephy-embed-single.h"
#include "ephy-embed-shell.h"
@@ -57,21 +55,19 @@
#include "eel-gconf-extensions.h"
#include "ephy-debug.h"
-#include "nsReadableUtils.h"
-#include "nsIChannel.h"
-#include "nsIHttpChannel.h"
-#include "nsIURL.h"
-#include "nsIStringEnumerator.h"
-#include "nsIPrefService.h"
-#include "nsIMIMEService.h"
-#include "nsIMIMEInfo.h"
-#include "nsIDOMHTMLDocument.h"
-#include "nsIDownload.h"
-#include "nsIMIMEHeaderParam.h"
-
#include <glib/gi18n.h>
#include <libgnomevfs/gnome-vfs-utils.h>
+#include <nsIChannel.h>
+#include <nsIHttpChannel.h>
+#include <nsIURL.h>
+#include <nsIPrefService.h>
+#include <nsIMIMEService.h>
+#include <nsIMIMEInfo.h>
+#include <nsIDOMHTMLDocument.h>
+#include <nsIDownload.h>
+#include <nsIMIMEHeaderParam.h>
+
EphyHeaderSniffer::EphyHeaderSniffer (nsIWebBrowserPersist* aPersist, MozillaEmbedPersist *aEmbedPersist,
nsIFile* aFile, nsIURI* aURL, nsIDOMDocument* aDocument, nsIInputStream* aPostData)
: mPersist(aPersist)
@@ -229,7 +225,6 @@ filechooser_response_cb (EphyFileChooser *dialog, gint response, EphyHeaderSniff
nsresult EphyHeaderSniffer::PerformSave (nsIURI* inOriginalURI)
{
nsresult rv;
- char *path, *download_dir;
EmbedPersistFlags flags;
PRBool askDownloadDest;
@@ -337,7 +332,6 @@ nsresult EphyHeaderSniffer::PerformSave (nsIURI* inOriginalURI)
EphyFileChooser *dialog;
GtkWindow *window;
const char *title;
- int response;
title = ephy_embed_persist_get_fc_title (EPHY_EMBED_PERSIST (mEmbedPersist));
window = ephy_embed_persist_get_fc_parent (EPHY_EMBED_PERSIST (mEmbedPersist));
diff --git a/embed/mozilla/EphyHeaderSniffer.h b/embed/mozilla/EphyHeaderSniffer.h
index a2e9fcba4..74c27dbf3 100644
--- a/embed/mozilla/EphyHeaderSniffer.h
+++ b/embed/mozilla/EphyHeaderSniffer.h
@@ -41,15 +41,18 @@
#include "mozilla-embed-persist.h"
-#include "nsString.h"
-#include "nsIWebProgressListener.h"
-#include "nsIWebBrowserPersist.h"
-#include "nsIURI.h"
-#include "nsILocalFile.h"
-#include "nsIInputStream.h"
-#include "nsIDOMDocument.h"
-#include "nsIAuthPrompt.h"
-#include "nsIPromptService.h"
+#include <nsIWebProgressListener.h>
+#include <nsIWebBrowserPersist.h>
+#include <nsIURI.h>
+#include <nsILocalFile.h>
+#include <nsIInputStream.h>
+#include <nsIDOMDocument.h>
+#include <nsIAuthPrompt.h>
+#include <nsIPromptService.h>
+
+#ifdef ALLOW_PRIVATE_STRINGS
+#include <nsString.h>
+#endif
class EphyHeaderSniffer : public nsIWebProgressListener,
public nsIAuthPrompt
diff --git a/embed/mozilla/EphySingle.cpp b/embed/mozilla/EphySingle.cpp
index a15237596..fee0eeb5b 100644
--- a/embed/mozilla/EphySingle.cpp
+++ b/embed/mozilla/EphySingle.cpp
@@ -27,13 +27,16 @@
#include "ephy-debug.h"
-#include <nsString.h>
#include <nsIURI.h>
#include <nsIPermissionManager.h>
#include <nsICookieManager.h>
#include <nsIServiceManager.h>
#include <nsICookie2.h>
+#ifdef ALLOW_PRIVATE_STRINGS
+#include <nsString.h>
+#endif
+
NS_IMPL_ISUPPORTS1(EphySingle, nsIObserver)
EphySingle::EphySingle()
diff --git a/embed/mozilla/EventContext.cpp b/embed/mozilla/EventContext.cpp
index 610f124e5..07144e3b3 100644
--- a/embed/mozilla/EventContext.cpp
+++ b/embed/mozilla/EventContext.cpp
@@ -145,7 +145,6 @@ nsresult EventContext::GatherTextUnder (nsIDOMNode* aNode, nsString& aResult)
nsresult EventContext::ResolveBaseURL (nsIDocument *doc, const nsAString &relurl, nsACString &url)
{
- nsresult rv;
#if MOZILLA_SNAPSHOT > 13
nsIURI *base;
base = doc->GetBaseURI ();
@@ -161,7 +160,6 @@ nsresult EventContext::ResolveBaseURL (nsIDocument *doc, const nsAString &relurl
nsresult EventContext::ResolveDocumentURL (nsIDocument *doc, const nsAString &relurl, nsACString &url)
{
- nsresult rv;
#if MOZILLA_SNAPSHOT > 13
nsIURI *uri;
uri = doc->GetDocumentURI ();
diff --git a/embed/mozilla/FilePicker.cpp b/embed/mozilla/FilePicker.cpp
index 292d7d9a8..b65038c6e 100644
--- a/embed/mozilla/FilePicker.cpp
+++ b/embed/mozilla/FilePicker.cpp
@@ -24,30 +24,26 @@
#endif
#include "FilePicker.h"
-
-#include "nsCRT.h"
-#include "nsCOMPtr.h"
-#include "nsISupportsArray.h"
-#include "nsIServiceManager.h"
-
-#include "nsString.h"
-#include "nsXPIDLString.h"
-#include "nsIPrefService.h"
-#include "nsIURI.h"
-#include "nsIFileURL.h"
-#include "nsIChannel.h"
-#include "nsIFileChannel.h"
-#include "nsNetCID.h"
-#include "nsILocalFile.h"
-#include "nsIPromptService.h"
-#include "nsReadableUtils.h"
-#include "nsIDOMWindow.h"
-#include "nsIDOMWindowInternal.h"
-#include "nsCOMPtr.h"
-#include "nsString.h"
-#include "nsILocalFile.h"
#include "MozillaPrivate.h"
+#include <nsCOMPtr.h>
+#include <nsIServiceManager.h>
+#include <nsIURI.h>
+#include <nsIFileURL.h>
+#include <nsILocalFile.h>
+#include <nsIPromptService.h>
+#include <nsIDOMWindow.h>
+#include <nsNetCID.h>
+
+#ifdef ALLOW_PRIVATE_STRINGS
+#include <nsString.h>
+#include <nsReadableUtils.h>
+#endif
+
+#if MOZILLA_SNAPSHOT < 16
+#include <nsIDOMWindowInternal.h>
+#endif
+
#include "ephy-string.h"
#include "ephy-prefs.h"
#include "ephy-gui.h"
diff --git a/embed/mozilla/GlobalHistory.cpp b/embed/mozilla/GlobalHistory.cpp
index b8b7a19e5..4e65161ff 100644
--- a/embed/mozilla/GlobalHistory.cpp
+++ b/embed/mozilla/GlobalHistory.cpp
@@ -27,9 +27,12 @@
#include "GlobalHistory.h"
-#include <nsString.h>
#include <nsIURI.h>
+#ifdef ALLOW_PRIVATE_STRINGS
+#include <nsString.h>
+#endif
+
#if MOZILLA_SNAPSHOT > 13
NS_IMPL_ISUPPORTS2(MozGlobalHistory, nsIGlobalHistory2, nsIBrowserHistory)
#else
diff --git a/embed/mozilla/GlobalHistory.h b/embed/mozilla/GlobalHistory.h
index ab3937afa..3b0bab389 100644
--- a/embed/mozilla/GlobalHistory.h
+++ b/embed/mozilla/GlobalHistory.h
@@ -26,10 +26,9 @@
#include "config.h"
#endif
-#include "nsError.h"
-#include "nsIBrowserHistory.h"
#include "ephy-history.h"
+#include <nsIBrowserHistory.h>
#if MOZILLA_SNAPSHOT > 13
#include <nsIGlobalHistory2.h>
#else
diff --git a/embed/mozilla/GtkNSSClientAuthDialogs.cpp b/embed/mozilla/GtkNSSClientAuthDialogs.cpp
index 3417fbecf..2ac781a92 100644
--- a/embed/mozilla/GtkNSSClientAuthDialogs.cpp
+++ b/embed/mozilla/GtkNSSClientAuthDialogs.cpp
@@ -28,9 +28,9 @@
#include "MozillaPrivate.h"
-#include "nsIServiceManager.h"
-#include "nsIInterfaceRequestor.h"
-#include "nsIInterfaceRequestorUtils.h"
+#include <nsIServiceManager.h>
+#include <nsIInterfaceRequestor.h>
+#include <nsIInterfaceRequestorUtils.h>
#include <gtk/gtkdialog.h>
#include <gtk/gtkimage.h>
diff --git a/embed/mozilla/GtkNSSClientAuthDialogs.h b/embed/mozilla/GtkNSSClientAuthDialogs.h
index 561b9e878..b9ac6c20c 100644
--- a/embed/mozilla/GtkNSSClientAuthDialogs.h
+++ b/embed/mozilla/GtkNSSClientAuthDialogs.h
@@ -10,8 +10,7 @@
#ifndef GTKNSSCLIENTAUTHDIALOGS_H
#define GTKNSSCLIENTAUTHDIALOGS_H 1
-#include <nsError.h>
-#include "nsIClientAuthDialogs.h"
+#include <nsIClientAuthDialogs.h>
// 55b3837e-dbde-4c24-9247-f328e3012485
#define GTK_NSSCLIENTAUTHDIALOGS_CID \
diff --git a/embed/mozilla/GtkNSSDialogs.cpp b/embed/mozilla/GtkNSSDialogs.cpp
index ab96b0d14..819afe9a3 100644
--- a/embed/mozilla/GtkNSSDialogs.cpp
+++ b/embed/mozilla/GtkNSSDialogs.cpp
@@ -34,19 +34,22 @@
#include "MozillaPrivate.h"
-#include "nsIX509Cert.h"
-#include "nsCOMPtr.h"
-#include "nsIServiceManager.h"
-#include "nsIInterfaceRequestor.h"
-#include "nsIInterfaceRequestorUtils.h"
-#include "nsIX509CertValidity.h"
-#include "nsIX509CertDB.h"
-#include "nsIASN1Object.h"
-#include "nsIASN1Sequence.h"
-#include "nsICRLInfo.h"
-#include "nsISimpleEnumerator.h"
-#include "nsIArray.h"
-#include "nsReadableUtils.h"
+#include <nsCOMPtr.h>
+#include <nsIServiceManager.h>
+#include <nsIInterfaceRequestor.h>
+#include <nsIInterfaceRequestorUtils.h>
+#include <nsIX509Cert.h>
+#include <nsIX509CertValidity.h>
+#include <nsIX509CertDB.h>
+#include <nsIASN1Object.h>
+#include <nsIASN1Sequence.h>
+#include <nsICRLInfo.h>
+#include <nsISimpleEnumerator.h>
+#include <nsIArray.h>
+
+#ifdef ALLOW_PRIVATE_STRINGS
+#include <nsReadableUtils.h>
+#endif
#include <gconf/gconf-client.h>
#include <gtk/gtkdialog.h>
@@ -70,16 +73,14 @@
#include <gtk/gtktextbuffer.h>
#include <gtk/gtktextview.h>
#include <gtk/gtkprogressbar.h>
-
#include <libgnome/gnome-i18n.h>
+#include <time.h>
#include "GtkNSSDialogs.h"
#include "ephy-file-helpers.h"
#include "ephy-glade.h"
#include "ephy-gui.h"
-#include <time.h>
-
NS_DEFINE_CID (kX509CertCID, NS_IX509CERT_IID);
NS_DEFINE_CID (kASN1ObjectCID, NS_IASN1OBJECT_IID);
diff --git a/embed/mozilla/GtkNSSDialogs.h b/embed/mozilla/GtkNSSDialogs.h
index 4f387453c..8825e3ed5 100644
--- a/embed/mozilla/GtkNSSDialogs.h
+++ b/embed/mozilla/GtkNSSDialogs.h
@@ -10,9 +10,8 @@
#ifndef GTKNSSDIALOGS_H
#define GTKNSSDIALOGS_H 1
-#include <nsError.h>
-#include "nsIBadCertListener.h"
-#include "nsICertificateDialogs.h"
+#include <nsIBadCertListener.h>
+#include <nsICertificateDialogs.h>
// 7a50a10d-9425-4e12-84b1-5822edacd8ce
#define GTK_NSSDIALOGS_CID \
diff --git a/embed/mozilla/GtkNSSKeyPairDialogs.cpp b/embed/mozilla/GtkNSSKeyPairDialogs.cpp
index f6aa6d29f..67b546b6b 100644
--- a/embed/mozilla/GtkNSSKeyPairDialogs.cpp
+++ b/embed/mozilla/GtkNSSKeyPairDialogs.cpp
@@ -43,12 +43,15 @@
#include "MozillaPrivate.h"
-#include "nsIServiceManager.h"
-#include "nsIInterfaceRequestor.h"
-#include "nsIInterfaceRequestorUtils.h"
-#include "nsIKeygenThread.h"
+#include <nsIServiceManager.h>
+#include <nsIInterfaceRequestor.h>
+#include <nsIInterfaceRequestorUtils.h>
+#include <nsIKeygenThread.h>
+#include <nsIDOMWindow.h>
+
+#ifdef ALLOW_PRIVATE_API
#include "nsIDOMWindowInternal.h"
-#include "nsIDOMWindow.h"
+#endif
#include "gtk/gtkdialog.h"
#include "gtk/gtkprogressbar.h"
diff --git a/embed/mozilla/GtkNSSKeyPairDialogs.h b/embed/mozilla/GtkNSSKeyPairDialogs.h
index 0252dab1a..cc80d5f7e 100644
--- a/embed/mozilla/GtkNSSKeyPairDialogs.h
+++ b/embed/mozilla/GtkNSSKeyPairDialogs.h
@@ -10,8 +10,7 @@
#ifndef GTKNSSKEYPAIRDIALOGS_H
#define GTKNSSKEYPAIRDIALOGS_H 1
-#include <nsError.h>
-#include "nsIGenKeypairInfoDlg.h"
+#include <nsIGenKeypairInfoDlg.h>
// 6a8b1aff-ae8b-4751-982e-4ce5ad544100
#define GTK_NSSKEYPAIRDIALOGS_CID \
diff --git a/embed/mozilla/Makefile.am b/embed/mozilla/Makefile.am
index 01034449b..249b5feaf 100644
--- a/embed/mozilla/Makefile.am
+++ b/embed/mozilla/Makefile.am
@@ -43,7 +43,7 @@ INCLUDES = \
if MAINTAINER_MODE
INCLUDES += -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED \
- -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED $(WARN_CXXFLAGS)
+ -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED $(MOZILLA_WARN_CXXFLAGS)
endif
noinst_LTLIBRARIES = libephymozillaembed.la
diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp
index 2dd99e98d..4c60d424d 100644
--- a/embed/mozilla/MozDownload.cpp
+++ b/embed/mozilla/MozDownload.cpp
@@ -55,14 +55,11 @@
#include <libgnomevfs/gnome-vfs-utils.h>
#include <glib/gi18n.h>
-#include "nsIExternalHelperAppService.h"
-#include "nsDirectoryServiceDefs.h"
-#include "nsDirectoryServiceUtils.h"
-#include "nsIRequest.h"
-#include "nsIMIMEInfo.h"
-#include "nsIFileURL.h"
-#include "netCore.h"
+#include <nsIFileURL.h>
+
+#ifdef ALLOW_PRIVATE_STRINGS
#include "nsNetUtil.h"
+#endif
const char* const persistContractID = "@mozilla.org/embedding/browser/nsWebBrowserPersist;1";
@@ -110,7 +107,6 @@ MozDownload::Init(nsIURI *aSource, nsIURI *aTarget, const PRUnichar *aDisplayNam
#endif
{
PRBool addToView = PR_TRUE;
- nsresult rv;
if (mEmbedPersist)
{
@@ -597,7 +593,7 @@ static char*
GetFilePath (const char *filename)
{
char *path = NULL;
- char *download_dir, *converted_dp, *expanded, *tmp;
+ char *download_dir, *converted_dp, *expanded;
download_dir = eel_gconf_get_string (CONF_STATE_DOWNLOAD_DIR);
diff --git a/embed/mozilla/MozDownload.h b/embed/mozilla/MozDownload.h
index 35a81ad2a..ced136801 100644
--- a/embed/mozilla/MozDownload.h
+++ b/embed/mozilla/MozDownload.h
@@ -43,23 +43,24 @@
#define MozDownload_h__
#include "mozilla-embed-persist.h"
-#include "nsIDownload.h"
-#include "nsIWebProgressListener.h"
-#include "nsIHelperAppLauncherDialog.h"
-#include "nsIExternalHelperAppService.h"
-#include "nsIDOMDocument.h"
-
-#include "nsString.h"
-#include "nsIURI.h"
-#include "nsILocalFile.h"
-#include "nsIWebBrowserPersist.h"
-#include "nsIObserver.h"
-#include "nsIRequest.h"
-#include "nsIMIMEInfo.h"
-
#include "downloader-view.h"
#include "ephy-download.h"
#include "ephy-embed-shell.h"
+
+#include <nsIDownload.h>
+#include <nsIWebProgressListener.h>
+#include <nsIDOMDocument.h>
+#include <nsIURI.h>
+#include <nsILocalFile.h>
+#include <nsIWebBrowserPersist.h>
+#include <nsIObserver.h>
+#include <nsIRequest.h>
+#include <nsIMIMEInfo.h>
+
+#ifdef ALLOW_PRIVATE_API
+#include <nsString.h>
+#endif
+
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
/* MozDownload
diff --git a/embed/mozilla/mozilla-embed-persist.cpp b/embed/mozilla/mozilla-embed-persist.cpp
index 68f545cfe..29b8b8804 100644
--- a/embed/mozilla/mozilla-embed-persist.cpp
+++ b/embed/mozilla/mozilla-embed-persist.cpp
@@ -31,14 +31,18 @@
#include "MozDownload.h"
#include <stddef.h>
+
#include <nsIWebBrowserPersist.h>
-#include <nsString.h>
#include <nsCWebBrowserPersist.h>
-#include <nsNetUtil.h>
#include <nsIHistoryEntry.h>
#include <nsISHEntry.h>
+
+#ifdef ALLOW_PRIVATE_STRINGS
+#include <nsString.h>
+#include <nsNetUtil.h>
#include <nsIDocumentEncoder.h>
#include <nsIDocument.h>
+#endif
static void
mozilla_embed_persist_class_init (MozillaEmbedPersistClass *klass);
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 9435a7203..693c39bec 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -43,17 +43,12 @@
#include <glib/gi18n.h>
#include <libgnomevfs/gnome-vfs-utils.h>
-#include <nsICacheService.h>
+
#include <nsCOMPtr.h>
#include <nsIPrefService.h>
-#include <nsNetCID.h>
#include <nsIServiceManager.h>
#include <nsIIOService.h>
-#include <nsIProtocolProxyService.h>
-#include <nsIAtom.h>
-#include <nsIFontEnumerator.h>
#include <nsISupportsPrimitives.h>
-#include <nsReadableUtils.h>
#include <nsICookieManager.h>
#include <nsIPassword.h>
#include <nsIPasswordManager.h>
@@ -63,15 +58,24 @@
#include <nsCPasswordManager.h>
#include <nsIPermission.h>
#include <nsIPermissionManager.h>
-#include <nsString.h>
#include <nsILocalFile.h>
#include <nsIURI.h>
-#include <nsNetUtil.h>
-#include <nsIHttpAuthManager.h>
+#ifdef ALLOW_PRIVATE_API
// FIXME: For setting the locale. hopefully gtkmozembed will do itself soon
#include <nsIChromeRegistry.h>
#include <nsILocaleService.h>
+#include <nsIProtocolProxyService.h>
+#include <nsIHttpAuthManager.h>
+#include <nsICacheService.h>
+#include <nsIFontEnumerator.h>
+#endif
+
+#ifdef ALLOW_PRIVATE_STRINGS
+#include <nsString.h>
+#include <nsReadableUtils.h>
+#include <nsNetUtil.h>
+#endif
#define MOZILLA_PROFILE_DIR "/mozilla"
#define MOZILLA_PROFILE_NAME "epiphany"
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 444e8bfc5..30d825f5f 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -34,17 +34,23 @@
#include "EventContext.h"
#include <gtkmozembed.h>
-#include <nsIWindowWatcher.h>
#include <nsIURI.h>
#include <nsIURL.h>
-#include <nsNetUtil.h>
-#include <nsString.h>
#include <nsIRequest.h>
#include <nsIWebProgressListener.h>
-#include <nsITransportSecurityInfo.h>
#include <nsIPrintOptions.h>
#include <nsGfxCIID.h>
+#ifdef ALLOW_PRIVATE_API
+/* not sure about this one */
+#include <nsITransportSecurityInfo.h>
+#endif
+
+#ifdef ALLOW_PRIVATE_STRINGS
+#include <nsNetUtil.h>
+#include <nsString.h>
+#endif
+
static void mozilla_embed_class_init (MozillaEmbedClass *klass);
static void mozilla_embed_init (MozillaEmbed *gs);
static void mozilla_embed_destroy (GtkObject *object);