зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1425363 - remove onWindowTitleChanged given that nobody uses it, r=bgrins
MozReview-Commit-ID: ALslAwZo4K9 --HG-- extra : rebase_source : ca1add0015eea86128c0c5f209252ebb6a228998
This commit is contained in:
Родитель
400701814b
Коммит
ffc0ed12d2
|
@ -158,8 +158,6 @@ async function waitForInstallDialog() {
|
|||
},
|
||||
onCloseWindow(aXULWindow) {
|
||||
},
|
||||
onWindowTitleChange(aXULWindow, aNewTitle) {
|
||||
}
|
||||
});
|
||||
});
|
||||
info("Install dialog opened, waiting for focus");
|
||||
|
|
|
@ -17,7 +17,6 @@ function waitForNewWindow() {
|
|||
domwindow.addEventListener("load", downloadOnLoad, true);
|
||||
},
|
||||
onCloseWindow: aXULWindow => {},
|
||||
onWindowTitleChange: (aXULWindow, aNewTitle) => {}
|
||||
};
|
||||
|
||||
Services.wm.addListener(listener);
|
||||
|
|
|
@ -345,7 +345,6 @@ WindowListener.prototype = {
|
|||
domwindow.addEventListener("load", onLoad, true);
|
||||
},
|
||||
onCloseWindow(aXULWindow) {},
|
||||
onWindowTitleChange(aXULWindow, aNewTitle) {},
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowMediatorListener,
|
||||
Ci.nsISupports]),
|
||||
};
|
||||
|
|
|
@ -56,6 +56,5 @@ function addWindowListener(aURL, aCallback) {
|
|||
}, domwindow);
|
||||
},
|
||||
onCloseWindow(aXULWindow) { },
|
||||
onWindowTitleChange(aXULWindow, aNewTitle) { }
|
||||
});
|
||||
}
|
||||
|
|
|
@ -402,7 +402,6 @@ WiFiRuntime.prototype = {
|
|||
}, {once: true});
|
||||
},
|
||||
onCloseWindow() {},
|
||||
onWindowTitleChange() {}
|
||||
};
|
||||
Services.wm.addListener(windowListener);
|
||||
|
||||
|
|
|
@ -615,8 +615,6 @@ BrowserTabList.prototype._listenToMediatorIf = function (shouldListen) {
|
|||
* An nsIWindowMediatorListener's methods get passed all sorts of windows; we
|
||||
* only care about the tab containers. Those have 'getBrowser' methods.
|
||||
*/
|
||||
BrowserTabList.prototype.onWindowTitleChange = () => { };
|
||||
|
||||
BrowserTabList.prototype.onOpenWindow =
|
||||
DevToolsUtils.makeInfallible(function (window) {
|
||||
let handleLoad = DevToolsUtils.makeInfallible(() => {
|
||||
|
|
|
@ -74,7 +74,6 @@ Client.defaultSendOOB = ({ authResult, oob }) => {
|
|||
}, {once: true});
|
||||
},
|
||||
onCloseWindow() {},
|
||||
onWindowTitleChange() {}
|
||||
};
|
||||
Services.wm.addListener(windowListener);
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ function addWindowListener(aURL, aCallback) {
|
|||
}, domwindow);
|
||||
},
|
||||
onCloseWindow(aXULWindow) { },
|
||||
onWindowTitleChange(aXULWindow, aNewTitle) { }
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ function addWindowListener(aURL, aCallback) {
|
|||
}, domwindow);
|
||||
},
|
||||
onCloseWindow(aXULWindow) { },
|
||||
onWindowTitleChange(aXULWindow, aNewTitle) { }
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ function test () {
|
|||
domwindow.addEventListener("load", downloadOnLoad, true);
|
||||
},
|
||||
onCloseWindow: function(aXULWindow) {},
|
||||
onWindowTitleChange: function(aXULWindow, aNewTitle) {}
|
||||
}
|
||||
|
||||
Services.wm.addListener(listener);
|
||||
|
|
|
@ -58,9 +58,6 @@
|
|||
onCloseWindow: function(aWindow) {
|
||||
detachFrom(aWindow);
|
||||
},
|
||||
|
||||
onWindowTitleChange: function(aWindow, aTitle) {
|
||||
}
|
||||
};
|
||||
|
||||
function doFullGc(aCallback, aIterations) {
|
||||
|
|
|
@ -31,7 +31,6 @@ var windowListener = {
|
|||
}, {once: true});
|
||||
},
|
||||
onCloseWindow: function(aWindow) { },
|
||||
onWindowTitleChange: function(aWindow, aTitle) { }
|
||||
};
|
||||
|
||||
function startup(aData, aReason) {
|
||||
|
|
|
@ -86,5 +86,4 @@ WindowListener.prototype = {
|
|||
}, {once: true});
|
||||
},
|
||||
onCloseWindow: function(aXULWindow) {},
|
||||
onWindowTitleChange: function(aXULWindow, aNewTitle) {}
|
||||
}
|
||||
|
|
|
@ -35,9 +35,6 @@ var windowListener = {
|
|||
onCloseWindow(aWindow) {
|
||||
aboutNewTabService.resetNewTabURL();
|
||||
},
|
||||
|
||||
onWindowTitleChange(aWindow, aTitle) {
|
||||
}
|
||||
};
|
||||
|
||||
function promiseOneEvent(target, eventName, capture) {
|
||||
|
|
|
@ -82,7 +82,6 @@ async function waitForViewSourceTabOrWindow(open) {
|
|||
}, {once: true});
|
||||
},
|
||||
onCloseWindow() {},
|
||||
onWindowTitleChange() {}
|
||||
};
|
||||
Services.wm.addListener(windowListener);
|
||||
});
|
||||
|
|
|
@ -43,8 +43,6 @@ function checkInstallConfirmation(...urls) {
|
|||
executeSoon(() => handleDialog(window));
|
||||
},
|
||||
|
||||
onWindowTitleChange() { },
|
||||
|
||||
onOpenWindow(window) {
|
||||
windows.add(window);
|
||||
let domwindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
|
|
|
@ -47,8 +47,6 @@ function checkInstallConfirmation(...urls) {
|
|||
executeSoon(() => handleDialog(window));
|
||||
},
|
||||
|
||||
onWindowTitleChange() { },
|
||||
|
||||
onOpenWindow(window) {
|
||||
windows.add(window);
|
||||
let domwindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
|
|
|
@ -458,9 +458,6 @@ function wait_for_window_open(aCallback) {
|
|||
|
||||
onCloseWindow(aWindow) {
|
||||
},
|
||||
|
||||
onWindowTitleChange(aWindow, aTitle) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -284,9 +284,6 @@ var Harness = {
|
|||
|
||||
// nsIWindowMediatorListener
|
||||
|
||||
onWindowTitleChange(window, title) {
|
||||
},
|
||||
|
||||
onOpenWindow(window) {
|
||||
var domwindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIDOMWindow);
|
||||
|
|
|
@ -103,14 +103,6 @@ interface nsIWindowMediator: nsISupports
|
|||
*/
|
||||
[noscript] void updateWindowTimeStamp(in nsIXULWindow aWindow);
|
||||
|
||||
/** Call this method when a window's title changes. Listeners (see
|
||||
* addListener) will be notified through their onWindowTitleChange method.
|
||||
* @param aWindow the window whose title has changed
|
||||
* @param inTitle the window's new title
|
||||
*/
|
||||
[noscript] void updateWindowTitle(in nsIXULWindow aWindow,
|
||||
in AString inTitle);
|
||||
|
||||
/* z-ordering: */
|
||||
|
||||
const unsigned long zLevelTop = 1;
|
||||
|
|
|
@ -10,8 +10,6 @@ interface nsIXULWindow;
|
|||
[scriptable, uuid(2F276982-0D60-4377-A595-D350BA516395)]
|
||||
interface nsIWindowMediatorListener : nsISupports
|
||||
{
|
||||
void onWindowTitleChange(in nsIXULWindow window, in AString newTitle);
|
||||
|
||||
void onOpenWindow(in nsIXULWindow window);
|
||||
void onCloseWindow(in nsIXULWindow window);
|
||||
};
|
||||
|
|
|
@ -394,22 +394,6 @@ nsWindowMediator::UpdateWindowTimeStamp(nsIXULWindow* inWindow)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindowMediator::UpdateWindowTitle(nsIXULWindow* inWindow,
|
||||
const nsAString& inTitle)
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
NS_ENSURE_STATE(mReady);
|
||||
if (GetInfoFor(inWindow)) {
|
||||
ListenerArray::ForwardIterator iter(mListeners);
|
||||
while (iter.HasMore()) {
|
||||
iter.GetNext()->OnWindowTitleChange(inWindow, inTitle);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* This method's plan is to intervene only when absolutely necessary.
|
||||
We will get requests to place our windows behind unknown windows.
|
||||
For the most part, we need to leave those alone (turning them into
|
||||
|
|
|
@ -902,14 +902,6 @@ NS_IMETHODIMP nsXULWindow::SetTitle(const nsAString& aTitle)
|
|||
mTitle.Assign(aTitle);
|
||||
mTitle.StripCRLF();
|
||||
NS_ENSURE_SUCCESS(mWindow->SetTitle(mTitle), NS_ERROR_FAILURE);
|
||||
|
||||
// Tell the window mediator that a title has changed
|
||||
nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(NS_WINDOWMEDIATOR_CONTRACTID));
|
||||
if (!windowMediator)
|
||||
return NS_OK;
|
||||
|
||||
windowMediator->UpdateWindowTitle(static_cast<nsIXULWindow*>(this), aTitle);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче