aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2008-03-10 03:48:04 +0800
committerChristian Persch <chpe@src.gnome.org>2008-03-10 03:48:04 +0800
commit777d98fa52496bd7d1e993bcab7a84b2b98417db (patch)
tree314f6c0915d67552038a127094b89817d9977c4a /embed/mozilla
parentf2c11cf41dbe3bce6cf1fa29bc5b8874242f3c17 (diff)
downloadgsoc2013-epiphany-777d98fa52496bd7d1e993bcab7a84b2b98417db.tar
gsoc2013-epiphany-777d98fa52496bd7d1e993bcab7a84b2b98417db.tar.gz
gsoc2013-epiphany-777d98fa52496bd7d1e993bcab7a84b2b98417db.tar.bz2
gsoc2013-epiphany-777d98fa52496bd7d1e993bcab7a84b2b98417db.tar.lz
gsoc2013-epiphany-777d98fa52496bd7d1e993bcab7a84b2b98417db.tar.xz
gsoc2013-epiphany-777d98fa52496bd7d1e993bcab7a84b2b98417db.tar.zst
gsoc2013-epiphany-777d98fa52496bd7d1e993bcab7a84b2b98417db.zip
Add stub impl of nsILoginManagerPrompter.
svn path=/branches/gnome-2-22/; revision=8075
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/EphyLoginPrompter.cpp97
-rw-r--r--embed/mozilla/EphyLoginPrompter.h45
-rw-r--r--embed/mozilla/MozRegisterComponents.cpp18
3 files changed, 159 insertions, 1 deletions
diff --git a/embed/mozilla/EphyLoginPrompter.cpp b/embed/mozilla/EphyLoginPrompter.cpp
new file mode 100644
index 000000000..ae7e590c6
--- /dev/null
+++ b/embed/mozilla/EphyLoginPrompter.cpp
@@ -0,0 +1,97 @@
+/*
+ * Copyright © 2005, 2006, 2008 Christian Persch
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "mozilla-config.h"
+#include "config.h"
+
+#include <glib/gi18n.h>
+
+#include <nsStringAPI.h>
+
+#include <nsComponentManagerUtils.h>
+#include <nsIChannel.h>
+#include <nsIDOMDocument.h>
+#include <nsIDOMHTMLDocument.h>
+#include <nsIDownload.h>
+#include <nsIHttpChannel.h>
+#include <nsIInputStream.h>
+#include <nsILocalFile.h>
+#include <nsIMIMEHeaderParam.h>
+#include <nsIMIMEInfo.h>
+#include <nsIMIMEService.h>
+#include <nsIPrefService.h>
+#include <nsIPromptService.h>
+#include <nsIURI.h>
+#include <nsIURL.h>
+#include <nsIWebBrowserPersist.h>
+#include <nsIWindowWatcher.h>
+#include <nsServiceManagerUtils.h>
+#include <nsXPCOMCID.h>
+
+#include "eel-gconf-extensions.h"
+#include "ephy-debug.h"
+#include "ephy-file-chooser.h"
+#include "ephy-gui.h"
+#include "ephy-prefs.h"
+
+#ifndef HAVE_GECKO_1_9
+#include "EphyBadCertRejector.h"
+#endif
+#include "MozDownload.h"
+
+#include "EphyLoginPrompter.h"
+
+EphyLoginPrompter::EphyLoginPrompter ()
+{
+ LOG ("EphyLoginPrompter ctor (%p)", this);
+}
+
+EphyLoginPrompter::~EphyLoginPrompter()
+{
+}
+
+NS_IMPL_ISUPPORTS1 (EphyLoginPrompter,
+ nsILoginManagerPrompter)
+
+/* void init (in nsIDOMWindow aWindow); */
+NS_IMETHODIMP EphyLoginPrompter::Init(nsIDOMWindow *aWindow)
+{
+ mWindow = aWindow;
+ return NS_OK;
+}
+
+/* void promptToSavePassword (in nsILoginInfo aLogin); */
+NS_IMETHODIMP EphyLoginPrompter::PromptToSavePassword(nsILoginInfo *aLogin)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void promptToChangePassword (in nsILoginInfo aOldLogin, in nsILoginInfo aNewLogin); */
+NS_IMETHODIMP EphyLoginPrompter::PromptToChangePassword(nsILoginInfo *aOldLogin, nsILoginInfo *aNewLogin)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void promptToChangePasswordWithUsernames ([array, size_is (count)] in nsILoginInfo logins, in PRUint32 count, in nsILoginInfo aNewLogin); */
+NS_IMETHODIMP EphyLoginPrompter::PromptToChangePasswordWithUsernames(nsILoginInfo **logins, PRUint32 count, nsILoginInfo *aNewLogin)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+
diff --git a/embed/mozilla/EphyLoginPrompter.h b/embed/mozilla/EphyLoginPrompter.h
new file mode 100644
index 000000000..2cdbdeb5b
--- /dev/null
+++ b/embed/mozilla/EphyLoginPrompter.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright © 2005, 2006, 2008 Christian Persch
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef EPHY_LOGIN_PROMPTER_H
+#define EPHY_LOGIN_PROMPTER_H
+
+#include <nsILoginManagerPrompter.h>
+#include <nsCOMPtr.h>
+#include <nsIDOMWindow.h>
+
+#define EPHY_LOGIN_PROMPTER_CLASSNAME "Epiphany Login Prompter"
+
+/* b005b95e-ef31-4214-bd0e-1dd4f2d3083a */
+#define EPHY_LOGIN_PROMPTER_CID { 0xb005b95e, 0xef31, 0x4214, { 0xbd, 0x0e, 0x1d, 0xd4, 0xf2, 0xd3, 0x08, 0x3a } }
+
+class EphyLoginPrompter : public nsILoginManagerPrompter
+{
+public:
+ EphyLoginPrompter ();
+ virtual ~EphyLoginPrompter ();
+
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSILOGINMANAGERPROMPTER
+
+private:
+ nsCOMPtr<nsIDOMWindow> mWindow;
+};
+
+#endif /* !EPHY_LOGIN_PROMPTER_H */
diff --git a/embed/mozilla/MozRegisterComponents.cpp b/embed/mozilla/MozRegisterComponents.cpp
index 3960052bf..838bbf69c 100644
--- a/embed/mozilla/MozRegisterComponents.cpp
+++ b/embed/mozilla/MozRegisterComponents.cpp
@@ -77,6 +77,10 @@
#include "GeckoFormSigningDialog.h"
#endif
+#ifdef HAVE_GECKO_1_9
+#include "EphyLoginPrompter.h"
+#endif
+
NS_GENERIC_FACTORY_CONSTRUCTOR(EphyAboutModule)
NS_GENERIC_FACTORY_CONSTRUCTOR(EphyContentPolicy)
NS_GENERIC_FACTORY_CONSTRUCTOR(EphyPromptService)
@@ -104,6 +108,10 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(GtkNSSSecurityWarningDialogs)
NS_GENERIC_FACTORY_CONSTRUCTOR(GeckoFormSigningDialog)
#endif
+#ifdef HAVE_GECKO_1_9
+NS_GENERIC_FACTORY_CONSTRUCTOR(EphyLoginPrompter)
+#endif
+
#define XPINSTALL_CONTRACTID NS_CONTENT_HANDLER_CONTRACTID_PREFIX "application/x-xpinstall"
/* class information */
@@ -278,7 +286,15 @@ static const nsModuleComponentInfo sAppComps[] = {
EPHY_COOKIEPROMPTSERVICE_CID,
EPHY_COOKIEPROMPTSERVICE_CONTRACTID,
GeckoCookiePromptServiceConstructor
- }
+ },
+#ifdef HAVE_GECKO_1_9
+ {
+ EPHY_LOGIN_PROMPTER_CLASSNAME,
+ EPHY_LOGIN_PROMPTER_CID,
+ NS_LOGINMANAGERPROMPTER_CONTRACTID,
+ EphyLoginPrompterConstructor
+ }
+#endif
};
gboolean