aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-11-18 03:39:38 +0800
committerChristian Persch <chpe@src.gnome.org>2004-11-18 03:39:38 +0800
commit0b0f98a2a486cfa4257b017446bbe93f7e352d1e (patch)
tree63a8ded1cb955b4280041fed263acf29d5f55d4f /embed/mozilla/mozilla-embed.cpp
parent24619e355a9632293107bda10768b4b5bbc07e49 (diff)
downloadgsoc2013-epiphany-0b0f98a2a486cfa4257b017446bbe93f7e352d1e.tar
gsoc2013-epiphany-0b0f98a2a486cfa4257b017446bbe93f7e352d1e.tar.gz
gsoc2013-epiphany-0b0f98a2a486cfa4257b017446bbe93f7e352d1e.tar.bz2
gsoc2013-epiphany-0b0f98a2a486cfa4257b017446bbe93f7e352d1e.tar.lz
gsoc2013-epiphany-0b0f98a2a486cfa4257b017446bbe93f7e352d1e.tar.xz
gsoc2013-epiphany-0b0f98a2a486cfa4257b017446bbe93f7e352d1e.tar.zst
gsoc2013-epiphany-0b0f98a2a486cfa4257b017446bbe93f7e352d1e.zip
Fix wrong certificate shown; Epiphany equivalent of galeon bug #158453.
2004-11-17 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/EphyBrowser.cpp: * embed/mozilla/EphyBrowser.h: * embed/mozilla/mozilla-embed.cpp: Fix wrong certificate shown; Epiphany equivalent of galeon bug #158453.
Diffstat (limited to 'embed/mozilla/mozilla-embed.cpp')
-rw-r--r--embed/mozilla/mozilla-embed.cpp37
1 files changed, 15 insertions, 22 deletions
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index dcd07d816..fd71b5cb9 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -72,8 +72,9 @@ static void mozilla_embed_new_window_cb (GtkMozEmbed *embed,
MozillaEmbed *membed);
static void mozilla_embed_security_change_cb (GtkMozEmbed *embed,
gpointer request,
- guint state, MozillaEmbed *membed);
-static EmbedSecurityLevel mozilla_embed_security_level (MozillaEmbed *membed);
+ PRUint32 state,
+ MozillaEmbed *membed);
+static EmbedSecurityLevel mozilla_embed_security_level (PRUint32 state);
#define MOZILLA_EMBED_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), MOZILLA_TYPE_EMBED, MozillaEmbedPrivate))
@@ -88,7 +89,6 @@ typedef enum
struct MozillaEmbedPrivate
{
EphyBrowser *browser;
- guint security_state;
MozillaEmbedLoadState load_state;
};
@@ -260,7 +260,6 @@ mozilla_embed_init (MozillaEmbed *embed)
{
embed->priv = MOZILLA_EMBED_GET_PRIVATE (embed);
embed->priv->browser = new EphyBrowser ();
- embed->priv->security_state = STATE_IS_UNKNOWN;
g_signal_connect_object (G_OBJECT (embed), "location",
G_CALLBACK (mozilla_embed_location_changed_cb),
@@ -632,24 +631,23 @@ impl_shistory_go_nth (EphyEmbed *embed,
}
static void
-impl_get_security_level (EphyEmbed *embed,
+impl_get_security_level (EphyEmbed *embed,
EmbedSecurityLevel *level,
char **description)
{
MozillaEmbedPrivate *mpriv = MOZILLA_EMBED (embed)->priv;
- g_return_if_fail (description != NULL && level != NULL);
-
- *description = NULL;
- *level = STATE_IS_UNKNOWN;
+ if (level) *level = STATE_IS_UNKNOWN;
+ if (description) *description = NULL;
nsresult rv;
+ PRUint32 state;
nsEmbedCString desc;
- rv = mpriv->browser->GetSecurityDescription (desc);
+ rv = mpriv->browser->GetSecurityInfo (&state, desc);
if (NS_FAILED (rv)) return;
- *description = g_strdup (desc.get());
- *level = mozilla_embed_security_level (MOZILLA_EMBED (embed));
+ if (level) *level = mozilla_embed_security_level (state);
+ if (description) *description = g_strdup (desc.get());
}
static void
@@ -1083,24 +1081,19 @@ mozilla_embed_new_window_cb (GtkMozEmbed *embed,
static void
mozilla_embed_security_change_cb (GtkMozEmbed *embed,
gpointer requestptr,
- guint state,
+ PRUint32 state,
MozillaEmbed *membed)
{
- EmbedSecurityLevel level;
-
- membed->priv->browser->SetSecurityInfo (static_cast<nsIRequest*>(requestptr));
- membed->priv->security_state = state;
- level = mozilla_embed_security_level (membed);
-
- g_signal_emit_by_name (membed, "ge_security_change", level);
+ g_signal_emit_by_name (membed, "ge_security_change",
+ mozilla_embed_security_level (state));
}
static EmbedSecurityLevel
-mozilla_embed_security_level (MozillaEmbed *membed)
+mozilla_embed_security_level (PRUint32 state)
{
EmbedSecurityLevel level;
- switch (membed->priv->security_state)
+ switch (state)
{
case nsIWebProgressListener::STATE_IS_INSECURE:
level = STATE_IS_INSECURE;