mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 861495 - Transplant getOuterWindowWithId from nsIDOMWindowUtils to a window-related service: WebappsHandler.jsm. r=myk
This commit is contained in:
parent
fad06aafc8
commit
f425139daf
@ -28,7 +28,7 @@ this.WebappsHandler = {
|
|||||||
|
|
||||||
switch (topic) {
|
switch (topic) {
|
||||||
case "webapps-ask-install":
|
case "webapps-ask-install":
|
||||||
let chromeWin = this._getWindowByOuterId(data.oid);
|
let chromeWin = Services.wm.getOuterWindowById(data.oid);
|
||||||
if (chromeWin)
|
if (chromeWin)
|
||||||
this.doInstall(data, chromeWin);
|
this.doInstall(data, chromeWin);
|
||||||
break;
|
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) {
|
doInstall: function(data, window) {
|
||||||
let {name} = data.app.manifest;
|
let {name} = data.app.manifest;
|
||||||
let bundle = Services.strings.createBundle("chrome://webapprt/locale/webapp.properties");
|
let bundle = Services.strings.createBundle("chrome://webapprt/locale/webapp.properties");
|
||||||
|
Loading…
Reference in New Issue
Block a user