Bug 869151. Implement GetParent for nsCocoaWindow so that nsBaseWidget::Destroy can find the parent and remove from the child list when destroying. r=smichaud

This commit is contained in:
Timothy Nikkel 2013-05-09 18:57:20 -05:00
parent 80d09dfe38
commit 329d8e7644
2 changed files with 7 additions and 0 deletions

View File

@ -216,6 +216,8 @@ public:
NS_IMETHOD Destroy(); NS_IMETHOD Destroy();
virtual nsIWidget* GetParent(void);
NS_IMETHOD Show(bool aState); NS_IMETHOD Show(bool aState);
virtual nsIWidget* GetSheetWindowParent(void); virtual nsIWidget* GetSheetWindowParent(void);
NS_IMETHOD Enable(bool aState); NS_IMETHOD Enable(bool aState);

View File

@ -534,6 +534,11 @@ NS_IMETHODIMP nsCocoaWindow::Destroy()
return NS_OK; return NS_OK;
} }
nsIWidget* nsCocoaWindow::GetParent()
{
return mParent;
}
nsIWidget* nsCocoaWindow::GetSheetWindowParent(void) nsIWidget* nsCocoaWindow::GetSheetWindowParent(void)
{ {
if (mWindowType != eWindowType_sheet) if (mWindowType != eWindowType_sheet)