Bug 1870336 - Remove unused nsIAppWindow.add/removeChildWindow. r=tnikkel

Differential Revision: https://phabricator.services.mozilla.com/D196599
This commit is contained in:
Emilio Cobos Álvarez 2023-12-16 10:47:01 +00:00
parent 313ac781af
commit 93b01a971d
3 changed files with 2 additions and 27 deletions

View File

@ -476,16 +476,6 @@ AppWindow::GetLiveResizeListeners() {
return listeners;
}
NS_IMETHODIMP AppWindow::AddChildWindow(nsIAppWindow* aChild) {
// we're not really keeping track of this right now
return NS_OK;
}
NS_IMETHODIMP AppWindow::RemoveChildWindow(nsIAppWindow* aChild) {
// we're not really keeping track of this right now
return NS_OK;
}
NS_IMETHODIMP AppWindow::ShowModal() {
AUTO_PROFILER_LABEL("AppWindow::ShowModal", OTHER);
@ -577,11 +567,9 @@ NS_IMETHODIMP AppWindow::Destroy() {
nsCOMPtr<nsIAppShellService> appShell(
do_GetService(NS_APPSHELLSERVICE_CONTRACTID));
NS_ASSERTION(appShell, "Couldn't get appShell... xpcom shutdown?");
if (appShell)
if (appShell) {
appShell->UnregisterTopLevelWindow(static_cast<nsIAppWindow*>(this));
nsCOMPtr<nsIAppWindow> parentWindow(do_QueryReferent(mParentWindow));
if (parentWindow) parentWindow->RemoveChildWindow(this);
}
// Remove modality (if any) and hide while destroying. More than
// a convenience, the hide prevents user interaction with the partially

View File

@ -736,7 +736,6 @@ nsresult nsAppShellService::JustCreateTopWindow(
}
window.forget(aResult);
if (parent) parent->AddChildWindow(*aResult);
if (center) rv = (*aResult)->Center(parent, parent ? false : true, false);

View File

@ -68,12 +68,6 @@ interface nsIAppWindow : nsISupports
[noscript,notxpcom] LiveResizeListenerArray getLiveResizeListeners();
/**
* Tell this window that it has picked up a child XUL window
* @param aChild the child window being added
*/
void addChildWindow(in nsIAppWindow aChild);
/**
* Returns the difference between the inner window size (client size) and the
* outer window size, in CSS pixels.
@ -81,12 +75,6 @@ interface nsIAppWindow : nsISupports
[infallible] readonly attribute unsigned long outerToInnerHeightDifferenceInCSSPixels;
[infallible] readonly attribute unsigned long outerToInnerWidthDifferenceInCSSPixels;
/**
* Tell this window that it has lost a child XUL window
* @param aChild the child window being removed
*/
void removeChildWindow(in nsIAppWindow aChild);
/**
* Move the window to a centered position.
* @param aRelative If not null, the window relative to which the window is