aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/GlobalHistory.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-09-06 00:41:12 +0800
committerChristian Persch <chpe@src.gnome.org>2005-09-06 00:41:12 +0800
commit0616ec5e16c2d2d435339d1842af79de9793af0e (patch)
tree8b6ab1a3a0f1f36d0f8d45970d6550c036ae88ed /embed/mozilla/GlobalHistory.cpp
parent2400a887ee9deb7acb756629e0fe73770a385e07 (diff)
downloadgsoc2013-epiphany-0616ec5e16c2d2d435339d1842af79de9793af0e.tar
gsoc2013-epiphany-0616ec5e16c2d2d435339d1842af79de9793af0e.tar.gz
gsoc2013-epiphany-0616ec5e16c2d2d435339d1842af79de9793af0e.tar.bz2
gsoc2013-epiphany-0616ec5e16c2d2d435339d1842af79de9793af0e.tar.lz
gsoc2013-epiphany-0616ec5e16c2d2d435339d1842af79de9793af0e.tar.xz
gsoc2013-epiphany-0616ec5e16c2d2d435339d1842af79de9793af0e.tar.zst
gsoc2013-epiphany-0616ec5e16c2d2d435339d1842af79de9793af0e.zip
Implement [SG]etGeckoURIFlags for gecko 1.9.
2005-09-05 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/GlobalHistory.cpp: * embed/ephy-history.h: Implement [SG]etGeckoURIFlags for gecko 1.9.
Diffstat (limited to 'embed/mozilla/GlobalHistory.cpp')
-rw-r--r--embed/mozilla/GlobalHistory.cpp41
1 files changed, 35 insertions, 6 deletions
diff --git a/embed/mozilla/GlobalHistory.cpp b/embed/mozilla/GlobalHistory.cpp
index 27d71b9ab..90b65c020 100644
--- a/embed/mozilla/GlobalHistory.cpp
+++ b/embed/mozilla/GlobalHistory.cpp
@@ -129,17 +129,46 @@ NS_IMETHODIMP MozGlobalHistory::SetPageTitle(nsIURI *aURI, const nsAString & aTi
#ifdef HAVE_GECKO_1_9
/* unsigned long getURIGeckoFlags(in nsIURI aURI); */
NS_IMETHODIMP
-GlobalHistory::GetURIGeckoFlags(nsIURI *aURI, PRUint32* aFlags)
+MozGlobalHistory::GetURIGeckoFlags(nsIURI *aURI, PRUint32* aFlags)
{
-#error Implement me!
- return NS_ERROR_NOT_IMPLEMENTED:
+ nsEmbedCString spec;
+ aURI->GetSpec(spec);
+
+ EphyNode *page = ephy_history_get_page (mGlobalHistory, spec.get());
+
+ GValue value = { 0, };
+ if (page != NULL &&
+ ephy_node_get_property (page, EPHY_NODE_PAGE_PROP_GECKO_FLAGS, &value))
+ {
+ *aFlags = (PRUint32) (gulong) g_value_get_long (&value);
+ g_value_unset (&value);
+
+ return NS_OK;
+ }
+
+ return NS_ERROR_FAILURE;
}
/* void setURIGeckoFlags(in nsIURI aURI, in unsigned long aFlags); */
NS_IMETHODIMP
-GlobalHistory::SetURIGeckoFlags(nsIURI *aURI, PRUint32 aFlags)
+MozGlobalHistory::SetURIGeckoFlags(nsIURI *aURI, PRUint32 aFlags)
{
-#error Implement me!
- return NS_ERROR_NOT_IMPLEMENTED:
+ nsEmbedCString spec;
+ aURI->GetSpec(spec);
+
+ EphyNode *page = ephy_history_get_page (mGlobalHistory, spec.get());
+ if (page != NULL)
+ {
+ GValue value = { 0, };
+
+ g_value_init (&value, G_TYPE_LONG);
+ g_value_set_long (&value, (long) (gulong) aFlags);
+ ephy_node_set_property (page, EPHY_NODE_PAGE_PROP_GECKO_FLAGS, &value);
+ g_value_unset (&value);
+
+ return NS_OK;
+ }
+
+ return NS_ERROR_FAILURE;
}
#endif /* HAVE_GECKO_1_9 */