diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-06-20 16:03:12 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-06-20 16:03:12 +0800 |
commit | 2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e (patch) | |
tree | 540f55fb52b740bde0571b39e6a10e043e6f1b57 /embed/mozilla | |
parent | a32f3bc82ae2cfc258d890c135bb109febb5f4b7 (diff) | |
download | gsoc2013-epiphany-2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e.tar gsoc2013-epiphany-2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e.tar.gz gsoc2013-epiphany-2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e.tar.bz2 gsoc2013-epiphany-2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e.tar.lz gsoc2013-epiphany-2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e.tar.xz gsoc2013-epiphany-2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e.tar.zst gsoc2013-epiphany-2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e.zip |
Implement GlobalHistory2::HidePage, fixes bug #142143.
2004-06-20 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/GlobalHistory.cpp:
Implement GlobalHistory2::HidePage, fixes bug #142143.
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/GlobalHistory.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/embed/mozilla/GlobalHistory.cpp b/embed/mozilla/GlobalHistory.cpp index d96417a69..352527dae 100644 --- a/embed/mozilla/GlobalHistory.cpp +++ b/embed/mozilla/GlobalHistory.cpp @@ -45,7 +45,8 @@ MozGlobalHistory::~MozGlobalHistory () NS_IMETHODIMP MozGlobalHistory::AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aToplevel) { nsresult rv; - NS_ENSURE_ARG_POINTER(aURI); + + NS_ENSURE_ARG (aURI); PRBool isJavascript; rv = aURI->SchemeIs("javascript", &isJavascript); @@ -98,6 +99,8 @@ NS_IMETHODIMP MozGlobalHistory::AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aT /* boolean isVisited (in nsIURI aURI); */ NS_IMETHODIMP MozGlobalHistory::IsVisited(nsIURI *aURI, PRBool *_retval) { + NS_ENSURE_ARG (aURI); + nsEmbedCString spec; aURI->GetSpec(spec); @@ -109,6 +112,8 @@ NS_IMETHODIMP MozGlobalHistory::IsVisited(nsIURI *aURI, PRBool *_retval) /* void setPageTitle (in nsIURI aURI, in AString aTitle); */ NS_IMETHODIMP MozGlobalHistory::SetPageTitle(nsIURI *aURI, const nsAString & aTitle) { + NS_ENSURE_ARG (aURI); + nsEmbedCString title; NS_UTF16ToCString (nsEmbedString (aTitle), NS_CSTRING_ENCODING_UTF8, title); @@ -122,9 +127,22 @@ NS_IMETHODIMP MozGlobalHistory::SetPageTitle(nsIURI *aURI, const nsAString & aTi } /* void hidePage (in nsIURI url); */ -NS_IMETHODIMP MozGlobalHistory::HidePage(nsIURI *url) +NS_IMETHODIMP MozGlobalHistory::HidePage(nsIURI *aURI) { - return NS_ERROR_NOT_IMPLEMENTED; + NS_ENSURE_ARG (aURI); + + nsEmbedCString spec; + aURI->GetSpec(spec); + + EphyNode *page; + page = ephy_history_get_page (mGlobalHistory, spec.get()); + + if (page) + { + ephy_node_unref (page); + } + + return NS_OK; } /* void removePage (in string aURL); */ |