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
f2064b7dbc
commit
3360c1ab9b
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user