mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 1499429 - 1. Notify child process of session transfer; r=esawin
Notify child process when we have a session transfer so the child process can update accordingly. Differential Revision: https://phabricator.services.mozilla.com/D8994
This commit is contained in:
parent
6f7b03e600
commit
e0b3022b2c
@ -28,18 +28,15 @@ class GeckoViewContentChild extends GeckoViewChildModule {
|
||||
Utils: "resource://gre/modules/sessionstore/Utils.jsm",
|
||||
});
|
||||
|
||||
this.messageManager.addMessageListener("GeckoView:SaveState",
|
||||
this);
|
||||
this.messageManager.addMessageListener("GeckoView:RestoreState",
|
||||
this);
|
||||
this.messageManager.addMessageListener("GeckoView:DOMFullscreenEntered",
|
||||
this);
|
||||
this.messageManager.addMessageListener("GeckoView:DOMFullscreenExited",
|
||||
this);
|
||||
this.messageManager.addMessageListener("GeckoView:ZoomToInput",
|
||||
this);
|
||||
this.messageManager.addMessageListener("GeckoView:SetActive",
|
||||
this);
|
||||
this.messageManager.addMessageListener("GeckoView:RestoreState", this);
|
||||
this.messageManager.addMessageListener("GeckoView:SaveState", this);
|
||||
this.messageManager.addMessageListener("GeckoView:SetActive", this);
|
||||
this.messageManager.addMessageListener("GeckoView:UpdateInitData", this);
|
||||
this.messageManager.addMessageListener("GeckoView:ZoomToInput", this);
|
||||
|
||||
const options = {
|
||||
mozSystemGroup: true,
|
||||
@ -245,6 +242,12 @@ class GeckoViewContentChild extends GeckoViewChildModule {
|
||||
content.windowUtils.mediaSuspend = aMsg.data.active ? Ci.nsISuspendedTypes.NONE_SUSPENDED : Ci.nsISuspendedTypes.SUSPENDED_PAUSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case "GeckoView:UpdateInitData":
|
||||
// Provide a hook for native code to detect a transfer.
|
||||
Services.obs.notifyObservers(
|
||||
docShell, "geckoview-content-global-transferred");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,6 +194,9 @@ var ModuleManager = {
|
||||
module.enabled = initData.modules[name];
|
||||
}
|
||||
}
|
||||
|
||||
// Notify child of the transfer.
|
||||
this._browser.messageManager.sendAsyncMessage(aEvent);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user