Made the destructor virtual. Added ContentShellAdded notification to nsXULWindow.
git-svn-id: svn://10.0.0.236/trunk@58892 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
95e05d4062
commit
1381b76423
@ -557,6 +557,27 @@ NS_IMETHODIMP nsXULWindow::PersistPositionAndSize(PRBool aPosition, PRBool aSize
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULWindow::ContentShellAdded(nsIDocShellTreeItem* aContentShell,
|
||||
PRBool aPrimary, const PRUnichar* aID)
|
||||
{
|
||||
nsContentShellInfo* shellInfo = new nsContentShellInfo(aID, aPrimary, aContentShell);
|
||||
|
||||
mContentShells.AppendElement((void*)shellInfo);
|
||||
|
||||
// Set the default content tree owner if one does not exist.
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeOwner> treeOwner;
|
||||
aContentShell->GetTreeOwner(getter_AddRefs(treeOwner));
|
||||
|
||||
if(!treeOwner)
|
||||
{
|
||||
NS_ENSURE_SUCCESS(EnsureContentTreeOwner(), NS_ERROR_FAILURE);
|
||||
aContentShell->SetTreeOwner(mContentTreeOwner);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsXULWindow: Accessors
|
||||
//*****************************************************************************
|
||||
@ -572,4 +593,5 @@ nsContentShellInfo::nsContentShellInfo(const nsString& aID, PRBool aPrimary,
|
||||
|
||||
nsContentShellInfo::~nsContentShellInfo()
|
||||
{
|
||||
//XXX Set Tree Owner to null if the tree owner is nsXULWindow->mContentTreeOwner
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ public:
|
||||
|
||||
protected:
|
||||
nsXULWindow();
|
||||
~nsXULWindow();
|
||||
virtual ~nsXULWindow();
|
||||
|
||||
NS_IMETHOD EnsureChromeTreeOwner();
|
||||
NS_IMETHOD EnsureContentTreeOwner();
|
||||
@ -62,6 +62,8 @@ protected:
|
||||
NS_IMETHOD GetDOMElementFromDocShell(nsIDocShell* aDocShell,
|
||||
nsIDOMElement** aDOMElement);
|
||||
NS_IMETHOD PersistPositionAndSize(PRBool aPosition, PRBool aSize);
|
||||
NS_IMETHOD ContentShellAdded(nsIDocShellTreeItem* aContentShell,
|
||||
PRBool aPrimary, const PRUnichar* aID);
|
||||
|
||||
protected:
|
||||
nsChromeTreeOwner* mChromeTreeOwner;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user