aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/EphyLoginPrompter.cpp38
1 files changed, 8 insertions, 30 deletions
diff --git a/embed/mozilla/EphyLoginPrompter.cpp b/embed/mozilla/EphyLoginPrompter.cpp
index ae7e590c6..ff9f7f956 100644
--- a/embed/mozilla/EphyLoginPrompter.cpp
+++ b/embed/mozilla/EphyLoginPrompter.cpp
@@ -24,36 +24,10 @@
#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"
+#include "EphyUtils.h"
-#ifndef HAVE_GECKO_1_9
-#include "EphyBadCertRejector.h"
-#endif
-#include "MozDownload.h"
+#include "ephy-debug.h"
+#include "ephy-embed.h"
#include "EphyLoginPrompter.h"
@@ -73,6 +47,11 @@ NS_IMPL_ISUPPORTS1 (EphyLoginPrompter,
NS_IMETHODIMP EphyLoginPrompter::Init(nsIDOMWindow *aWindow)
{
mWindow = aWindow;
+
+ /* Ensure it's one of ours */
+ GtkWidget *embed = EphyUtils::FindGtkParent (aWindow);
+ NS_ENSURE_TRUE (embed, NS_ERROR_FAILURE);
+
return NS_OK;
}
@@ -94,4 +73,3 @@ NS_IMETHODIMP EphyLoginPrompter::PromptToChangePasswordWithUsernames(nsILoginInf
return NS_ERROR_NOT_IMPLEMENTED;
}
-