diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2003-10-27 23:18:14 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-10-27 23:18:14 +0800 |
commit | 0c602edff1de6eaf85746201f94e2b1c4d815da0 (patch) | |
tree | f8eec8899ad045851561fb66b1967d930e1db813 /embed/mozilla/mozilla-embed.cpp | |
parent | 21f69a6461a12704c97fad51d7ac709faab90cdc (diff) | |
download | gsoc2013-epiphany-0c602edff1de6eaf85746201f94e2b1c4d815da0.tar gsoc2013-epiphany-0c602edff1de6eaf85746201f94e2b1c4d815da0.tar.gz gsoc2013-epiphany-0c602edff1de6eaf85746201f94e2b1c4d815da0.tar.bz2 gsoc2013-epiphany-0c602edff1de6eaf85746201f94e2b1c4d815da0.tar.lz gsoc2013-epiphany-0c602edff1de6eaf85746201f94e2b1c4d815da0.tar.xz gsoc2013-epiphany-0c602edff1de6eaf85746201f94e2b1c4d815da0.tar.zst gsoc2013-epiphany-0c602edff1de6eaf85746201f94e2b1c4d815da0.zip |
Solving the wrapper mess Episode 1.
2003-10-27 Marco Pesenti Gritti <marco@gnome.org>
* embed/ephy-embed.c:
* embed/ephy-embed.h:
* embed/mozilla/EphyWrapper.cpp:
* embed/mozilla/EphyWrapper.h:
* embed/mozilla/EventContext.cpp:
* embed/mozilla/mozilla-embed-persist.cpp:
* embed/mozilla/mozilla-embed.cpp:
Solving the wrapper mess Episode 1.
Cleanup EphyWrapper to use higher level apis.
Do not set docshell history explicitly, it seem
to pickup the registered one nicely.
Diffstat (limited to 'embed/mozilla/mozilla-embed.cpp')
-rw-r--r-- | embed/mozilla/mozilla-embed.cpp | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index defa2fc12..7313fd3eb 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -124,9 +124,6 @@ impl_shistory_get_pos (EphyEmbed *embed, static gresult impl_shistory_go_nth (EphyEmbed *embed, int nth); -static gboolean -impl_shistory_copy (EphyEmbed *source, - EphyEmbed *dest); static gresult impl_get_security_level (EphyEmbed *embed, EmbedSecurityLevel *level, @@ -402,7 +399,6 @@ ephy_embed_init (EphyEmbedClass *embed_class) embed_class->shistory_get_nth = impl_shistory_get_nth; embed_class->shistory_get_pos = impl_shistory_get_pos; embed_class->shistory_go_nth = impl_shistory_go_nth; - embed_class->shistory_copy = impl_shistory_copy; embed_class->get_security_level = impl_get_security_level; embed_class->find_next = impl_find_next; embed_class->activate = impl_activate; @@ -765,13 +761,13 @@ impl_get_location (EphyEmbed *embed, if (toplevel) { - rv = wrapper->GetMainDocumentUrl (url); + rv = wrapper->GetDocumentUrl (url); l = (NS_SUCCEEDED (rv) && !url.IsEmpty()) ? g_strdup (url.get()) : NULL; } else { - rv = wrapper->GetDocumentUrl (url); + rv = wrapper->GetTargetDocumentUrl (url); l = (NS_SUCCEEDED (rv) && !url.IsEmpty()) ? g_strdup (url.get()) : NULL; } @@ -981,25 +977,6 @@ impl_shistory_go_nth (EphyEmbed *embed, return NS_SUCCEEDED(rv) ? G_OK : G_FAILED; } -static gboolean -impl_shistory_copy (EphyEmbed *source, - EphyEmbed *dest) -{ - nsresult rv; - EphyWrapper *s_wrapper; - EphyWrapper *d_wrapper; - - s_wrapper = MOZILLA_EMBED(source)->priv->wrapper; - g_return_val_if_fail (s_wrapper != NULL, G_FAILED); - - d_wrapper = MOZILLA_EMBED(dest)->priv->wrapper; - g_return_val_if_fail (d_wrapper != NULL, G_FAILED); - - rv = s_wrapper->CopyHistoryTo (d_wrapper); - - return NS_SUCCEEDED(rv) ? G_OK : G_FAILED; -} - static gresult impl_get_security_level (EphyEmbed *embed, EmbedSecurityLevel *level, @@ -1264,22 +1241,6 @@ mozilla_embed_visibility_cb (GtkMozEmbed *embed, gboolean visibility, MozillaEmbed *membed) { g_signal_emit_by_name (membed, "ge_visibility", visibility); - - nsresult rv; - nsCOMPtr<nsIWindowWatcher> wwatch - (do_GetService(WINDOWWATCHER_CONTRACTID, &rv)); - if (NS_FAILED(rv) || !wwatch) return; - - EphyWrapper *wrapper = membed->priv->wrapper; - - if (wrapper) - { - nsCOMPtr<nsIDOMWindow> domWindow; - rv = wrapper->GetDOMWindow(getter_AddRefs(domWindow)); - if(NS_FAILED(rv) || !domWindow) return; - - rv = wwatch->SetActiveWindow(domWindow); - } } static gint |