mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 565541 (1/2) - Add targetableShellCount to nsIDocShellTreeOwner. r=bz
Basically, this will return a the number of tabs when nsIDocShellTreeOwner is a nsContentTreeOwner. --HG-- extra : rebase_source : b998c4bd81fc95a099dbcd246f4a3df85acd861e
This commit is contained in:
parent
b26e5d06c1
commit
b9a14ba1c4
@ -45,7 +45,7 @@
|
||||
|
||||
interface nsIDocShellTreeItem;
|
||||
|
||||
[scriptable, uuid(bc0eb30e-656e-491e-a7ae-7f460b660c8d)]
|
||||
[scriptable, uuid(932f9f93-8e21-4728-a527-cafc64b4d831)]
|
||||
interface nsIDocShellTreeOwner : nsISupports
|
||||
{
|
||||
/*
|
||||
@ -116,4 +116,9 @@ interface nsIDocShellTreeOwner : nsISupports
|
||||
void getPersistence(out boolean aPersistPosition,
|
||||
out boolean aPersistSize,
|
||||
out boolean aPersistSizeMode);
|
||||
|
||||
/*
|
||||
Gets the number of targettable docshells.
|
||||
*/
|
||||
readonly attribute unsigned long targetableShellCount;
|
||||
};
|
||||
|
@ -467,6 +467,18 @@ nsDocShellTreeOwner::GetPersistence(PRBool* aPersistPosition,
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShellTreeOwner::GetTargetableShellCount(PRUint32* aResult)
|
||||
{
|
||||
if(mTreeOwner) {
|
||||
mTreeOwner->GetTargetableShellCount(aResult);
|
||||
} else {
|
||||
*aResult = 0;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsDocShellTreeOwner::nsIBaseWindow
|
||||
//*****************************************************************************
|
||||
|
@ -357,6 +357,13 @@ nsChromeTreeOwner::GetPersistence(PRBool* aPersistPosition,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsChromeTreeOwner::GetTargetableShellCount(PRUint32* aResult)
|
||||
{
|
||||
*aResult = 0;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsChromeTreeOwner::nsIBaseWindow
|
||||
//*****************************************************************************
|
||||
|
@ -434,6 +434,14 @@ nsContentTreeOwner::GetPersistence(PRBool* aPersistPosition,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsContentTreeOwner::GetTargetableShellCount(PRUint32* aResult)
|
||||
{
|
||||
NS_ENSURE_STATE(mXULWindow);
|
||||
*aResult = mXULWindow->mTargetableShells.Count();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsContentTreeOwner::nsIWebBrowserChrome3
|
||||
//*****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user