aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-05-05 20:55:11 +0800
committerChristian Persch <chpe@src.gnome.org>2005-05-05 20:55:11 +0800
commit39d6c68acf69f08e5d141b6a2fc91c003a5f594c (patch)
tree8bcbfd7655e180adb459d02c651605a19810f626
parent7e6e562f008531e7197bf71c4526d4d49f040766 (diff)
downloadgsoc2013-epiphany-39d6c68acf69f08e5d141b6a2fc91c003a5f594c.tar
gsoc2013-epiphany-39d6c68acf69f08e5d141b6a2fc91c003a5f594c.tar.gz
gsoc2013-epiphany-39d6c68acf69f08e5d141b6a2fc91c003a5f594c.tar.bz2
gsoc2013-epiphany-39d6c68acf69f08e5d141b6a2fc91c003a5f594c.tar.lz
gsoc2013-epiphany-39d6c68acf69f08e5d141b6a2fc91c003a5f594c.tar.xz
gsoc2013-epiphany-39d6c68acf69f08e5d141b6a2fc91c003a5f594c.tar.zst
gsoc2013-epiphany-39d6c68acf69f08e5d141b6a2fc91c003a5f594c.zip
Thanks to the fastback patch, we can now get the secure browser UI object
2005-05-05 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/EphyBrowser.cpp: * embed/mozilla/MozRegisterComponents.cpp: Thanks to the fastback patch, we can now get the secure browser UI object from the docshell.
-rw-r--r--ChangeLog8
-rw-r--r--embed/mozilla/EphyBrowser.cpp12
-rw-r--r--embed/mozilla/MozRegisterComponents.cpp8
3 files changed, 22 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index a52b0d32b..6b9a8d5c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-05-05 Christian Persch <chpe@cvs.gnome.org>
+
+ * embed/mozilla/EphyBrowser.cpp:
+ * embed/mozilla/MozRegisterComponents.cpp:
+
+ Thanks to the fastback patch, we can now get the secure browser UI
+ object from the docshell.
+
2005-05-04 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/mozilla-embed-persist.cpp:
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index 91bfca09d..0372fc13c 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -525,6 +525,13 @@ nsresult EphyBrowser::Init (GtkMozEmbed *mozembed)
NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
#ifdef HAVE_MOZILLA_PSM
+#ifdef HAVE_GECKO_1_8
+ nsCOMPtr<nsIDocShell> docShell (do_GetInterface (mWebBrowser, &rv));
+ NS_ENSURE_SUCCESS (rv, rv);
+
+ rv = docShell->GetSecurityUI (getter_AddRefs (mSecurityInfo));
+ NS_ENSURE_SUCCESS (rv, rv);
+#else
/* FIXME: mozilla sucks! nsWebBrowser already has an instance of this,
* but we cannot get to it!
* See https://bugzilla.mozilla.org/show_bug.cgi?id=94974
@@ -561,11 +568,12 @@ nsresult EphyBrowser::Init (GtkMozEmbed *mozembed)
NS_ENSURE_SUCCESS (rv, rv);
}
}
+#endif /* HAVE_GECKO_1_8 */
if (!mSecurityInfo)
{
- g_warning ("Failed to instantiate nsISecureBrowserUI!\n");
+ g_warning ("Failed to get nsISecureBrowserUI!\n");
}
-#endif
+#endif /* HAVE_MOZILLA_PSM */
mInitialized = PR_TRUE;
diff --git a/embed/mozilla/MozRegisterComponents.cpp b/embed/mozilla/MozRegisterComponents.cpp
index 4a8f8243f..d6f83da95 100644
--- a/embed/mozilla/MozRegisterComponents.cpp
+++ b/embed/mozilla/MozRegisterComponents.cpp
@@ -199,7 +199,7 @@ static const nsModuleComponentInfo sAppComps[] = {
},
};
-#ifdef HAVE_MOZILLA_PSM
+#if defined(HAVE_MOZILLA_PSM) && !defined(HAVE_GECKO_1_8)
/* 5999dfd3-571f-4fcf-964b-386879f5cded */
#define NEW_CID { 0x5999dfd3, 0x571f, 0x4fcf, { 0x96, 0x4b, 0x38, 0x68, 0x79, 0xf5, 0xcd, 0xed } }
@@ -234,7 +234,7 @@ reregister_secure_browser_ui (nsIComponentManager *cm,
return rv;
}
-#endif /* HAVE_MOZILLA_PSM */
+#endif /* defined(HAVE_MOZILLA_PSM) && !defined(HAVE_GECKO_1_8) */
gboolean
mozilla_register_components (void)
@@ -286,14 +286,14 @@ mozilla_register_components (void)
}
}
-#ifdef HAVE_MOZILLA_PSM
+#if defined(HAVE_MOZILLA_PSM) && !defined(HAVE_GECKO_1_8)
/* Workaround for http://bugzilla.gnome.org/show_bug.cgi?id=164670 */
rv = reregister_secure_browser_ui (cm, cr);
if (NS_FAILED (rv))
{
g_warning ("Failed to divert the nsISecureBrowserUI implementation!\n");
}
-#endif /* HAVE_MOZILLA_PSM */
+#endif /* defined(HAVE_MOZILLA_PSM) && !defined(HAVE_GECKO_1_8) */
return ret;
}