currentURI property removed from nsIDocShell. currentURI property changed to return nsIURI on nsIWebNavigation. b=46847, r=valeski, a=valeski

This commit is contained in:
locka%iol.ie 2000-08-30 11:32:30 +00:00
parent 6731fd7727
commit 6cc103a9e8
3 changed files with 8 additions and 33 deletions

View File

@ -359,16 +359,6 @@ NS_IMETHODIMP nsDocShell::StopLoad()
}
NS_IMETHODIMP nsDocShell::GetCurrentURI(nsIURI** aURI)
{
NS_ENSURE_ARG_POINTER(aURI);
*aURI = mCurrentURI;
NS_IF_ADDREF(*aURI);
return NS_OK;
}
NS_IMETHODIMP
nsDocShell::GetDocLoaderObserver(nsIDocumentLoaderObserver * *aDocLoaderObserver)
{
@ -1468,24 +1458,13 @@ NS_IMETHODIMP nsDocShell::GetDocument(nsIDOMDocument** aDocument)
return mContentViewer->GetDOMDocument(aDocument);
}
NS_IMETHODIMP nsDocShell::GetCurrentURI(PRUnichar** aCurrentURI)
NS_IMETHODIMP nsDocShell::GetCurrentURI(nsIURI** aURI)
{
NS_ENSURE_ARG_POINTER(aCurrentURI);
NS_ENSURE_ARG_POINTER(aURI);
if(!mCurrentURI)
{
*aCurrentURI = nsnull;
return NS_OK;
}
char* spec;
NS_ENSURE_SUCCESS(mCurrentURI->GetSpec(&spec), NS_ERROR_FAILURE);
*aCurrentURI = NS_ConvertASCIItoUCS2(spec).ToNewUnicode();
if(spec)
nsCRT::free(spec);
*aURI = mCurrentURI;
NS_IF_ADDREF(*aURI);
return NS_OK;
}

View File

@ -96,11 +96,6 @@ interface nsIDocShell : nsISupports
*/
void stopLoad();
/*
The current URI that is loaded.
*/
readonly attribute nsIURI currentURI;
/* clients may get and set an nsIDocumentLoaderObserver, which will be notified
* during loadURI, loadURIVia, and setDocument
*/

View File

@ -32,6 +32,7 @@
interface nsISHistory;
interface nsISHEntry;
interface nsIURI;
[scriptable, uuid(F5D9E7B0-D930-11d3-B057-00A024FFC08C)]
interface nsIWebNavigation : nsISupports
@ -123,9 +124,9 @@ interface nsIWebNavigation : nsISupports
readonly attribute nsIDOMDocument document;
/*
Retrieves the current URI that is loaded.
The current URI that is loaded.
*/
readonly attribute wstring currentURI;
readonly attribute nsIURI currentURI;
/*
The session history object used to store the session history for the session.