From f425139daf251afe008ad4c763b18872f0cfbda1 Mon Sep 17 00:00:00 2001 From: Colby Russell Date: Tue, 7 May 2013 12:34:21 -0400 Subject: [PATCH] Bug 861495 - Transplant getOuterWindowWithId from nsIDOMWindowUtils to a window-related service: WebappsHandler.jsm. r=myk --- webapprt/WebappsHandler.jsm | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/webapprt/WebappsHandler.jsm b/webapprt/WebappsHandler.jsm index a6fe4440de4..532a4866989 100644 --- a/webapprt/WebappsHandler.jsm +++ b/webapprt/WebappsHandler.jsm @@ -28,7 +28,7 @@ this.WebappsHandler = { switch (topic) { case "webapps-ask-install": - let chromeWin = this._getWindowByOuterId(data.oid); + let chromeWin = Services.wm.getOuterWindowById(data.oid); if (chromeWin) this.doInstall(data, chromeWin); break; @@ -41,18 +41,6 @@ this.WebappsHandler = { } }, - _getWindowByOuterId: function(outerId) { - let someWindow = Services.wm.getMostRecentWindow(null); - if (!someWindow) { - return null; - } - - let content = someWindow.QueryInterface(Ci.nsIInterfaceRequestor). - getInterface(Ci.nsIDOMWindowUtils). - getOuterWindowWithId(outerId); - return content; - }, - doInstall: function(data, window) { let {name} = data.app.manifest; let bundle = Services.strings.createBundle("chrome://webapprt/locale/webapp.properties");