Loading mobile/shared/actors/ContentDelegateChild.sys.mjs +7 −18 Original line number Diff line number Diff line Loading @@ -27,10 +27,7 @@ export class ContentDelegateChild extends GeckoViewActorChild { return; } this.lastViewportFit = viewportFit; this.eventDispatcher.sendRequest({ type: "GeckoView:DOMMetaViewportFit", viewportfit: viewportFit, }); this.sendAsyncMessage("GeckoView:DOMMetaViewportFit", viewportFit); } ); } Loading Loading @@ -179,7 +176,6 @@ export class ContentDelegateChild extends GeckoViewActorChild { if (uri || isImage || isMedia) { const msg = { type: "GeckoView:ContextMenu", // We don't have full zoom on Android, so using CSS coordinates // here is fine, since the CSS coordinate spaces match between the // child and parent processes. Loading @@ -200,13 +196,13 @@ export class ContentDelegateChild extends GeckoViewActorChild { null, }; this.eventDispatcher.sendRequest(msg); this.sendAsyncMessage("GeckoView:ContextMenu", msg); aEvent.preventDefault(); } break; } case "MozDOMFullscreen:Request": { this.sendAsyncMessage("GeckoView:DOMFullscreenRequest", {}); this.sendAsyncMessage("GeckoView:DOMFullscreenRequest"); break; } case "MozDOMFullscreen:Entered": Loading @@ -219,7 +215,7 @@ export class ContentDelegateChild extends GeckoViewActorChild { } // fall-through case "MozDOMFullscreen:Exit": this.sendAsyncMessage("GeckoView:DOMFullscreenExit", {}); this.sendAsyncMessage("GeckoView:DOMFullscreenExit"); break; case "DOMMetaViewportFitChanged": if (aEvent.originalTarget.ownerGlobal == this.contentWindow) { Loading @@ -241,24 +237,17 @@ export class ContentDelegateChild extends GeckoViewActorChild { this.contentWindow ); if (manifest) { this.eventDispatcher.sendRequest({ type: "GeckoView:WebAppManifest", manifest, }); this.sendAsyncMessage("GeckoView:WebAppManifest", manifest); } }); break; } case "MozFirstContentfulPaint": { this.eventDispatcher.sendRequest({ type: "GeckoView:FirstContentfulPaint", }); this.sendAsyncMessage("GeckoView:FirstContentfulPaint"); break; } case "MozPaintStatusReset": { this.eventDispatcher.sendRequest({ type: "GeckoView:PaintStatusReset", }); this.sendAsyncMessage("GeckoView:PaintStatusReset"); break; } } Loading mobile/shared/actors/ContentDelegateParent.sys.mjs +33 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,39 @@ export class ContentDelegateParent extends GeckoViewActorParent { this.window.windowUtils.remoteFrameFullscreenChanged(this.browser); return null; } case "GeckoView:DOMMetaViewportFit": { return this.eventDispatcher.sendRequest({ viewportfit: aMsg.data, type: "GeckoView:DOMMetaViewportFit", }); } case "GeckoView:ContextMenu": { return this.eventDispatcher.sendRequest({ ...aMsg.data, type: "GeckoView:ContextMenu", }); } case "GeckoView:WebAppManifest": { return this.eventDispatcher.sendRequest({ manifest: aMsg.data, type: "GeckoView:WebAppManifest", }); } case "GeckoView:FirstContentfulPaint": { return this.eventDispatcher.sendRequest({ type: "GeckoView:FirstContentfulPaint", }); } case "GeckoView:PaintStatusReset": { return this.eventDispatcher.sendRequest({ type: "GeckoView:PaintStatusReset", }); } } return super.receiveMessage(aMsg); Loading mobile/shared/actors/GeckoViewContentChild.sys.mjs +1 −4 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ export class GeckoViewContentChild extends GeckoViewActorChild { } actorCreated() { super.actorCreated(); this.pageShow = new Promise(resolve => { this.receivedPageShow = resolve; }); Loading Loading @@ -334,8 +332,7 @@ export class GeckoViewContentChild extends GeckoViewActorChild { aEvent.reason === "presscaret" || aEvent.reason === "releasecaret" ) { this.eventDispatcher.sendRequest({ type: "GeckoView:PinOnScreen", this.sendAsyncMessage("GeckoView:PinOnScreen", { pinned: aEvent.reason === "presscaret", }); } Loading mobile/shared/actors/GeckoViewContentParent.sys.mjs +14 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,20 @@ export class GeckoViewContentParent extends GeckoViewActorParent { return this.sendQuery("ContainsFormData"); } async receiveMessage(aMsg) { switch (aMsg.name) { case "GeckoView:PinOnScreen": { return this.eventDispatcher.sendRequest({ ...aMsg.data, type: "GeckoView:PinOnScreen", }); } default: { return super.receiveMessage(aMsg); } } } restoreState({ history, switchId, formdata, scrolldata }) { if (Services.appinfo.sessionHistoryInParent) { const { browsingContext } = this.browser; Loading mobile/shared/actors/GeckoViewPermissionChild.sys.mjs +3 −6 Original line number Diff line number Diff line Loading @@ -20,8 +20,7 @@ const MAPPED_TO_EXTENSION_PERMISSIONS = [ export class GeckoViewPermissionChild extends GeckoViewActorChild { getMediaPermission(aPermission) { return this.eventDispatcher.sendRequestForResult({ type: "GeckoView:MediaPermission", return this.sendQuery("GeckoView:MediaPermission", { ...aPermission, }); } Loading @@ -35,8 +34,7 @@ export class GeckoViewPermissionChild extends GeckoViewActorChild { } mediaRecordingStatusChanged(aDevices) { return this.eventDispatcher.sendRequest({ type: "GeckoView:MediaRecordingStatusChanged", return this.sendAsyncMessage("GeckoView:MediaRecordingStatusChanged", { devices: aDevices, }); } Loading Loading @@ -132,8 +130,7 @@ export class GeckoViewPermissionChild extends GeckoViewActorChild { let allowOrDeny; try { allowOrDeny = await this.eventDispatcher.sendRequestForResult({ type: "GeckoView:ContentPermission", allowOrDeny = await this.sendQuery("GeckoView:ContentPermission", { uri: principal.URI.displaySpec, thirdPartyOrigin: aRequest.principal.origin, principal: lazy.E10SUtils.serializePrincipal(principal), Loading Loading
mobile/shared/actors/ContentDelegateChild.sys.mjs +7 −18 Original line number Diff line number Diff line Loading @@ -27,10 +27,7 @@ export class ContentDelegateChild extends GeckoViewActorChild { return; } this.lastViewportFit = viewportFit; this.eventDispatcher.sendRequest({ type: "GeckoView:DOMMetaViewportFit", viewportfit: viewportFit, }); this.sendAsyncMessage("GeckoView:DOMMetaViewportFit", viewportFit); } ); } Loading Loading @@ -179,7 +176,6 @@ export class ContentDelegateChild extends GeckoViewActorChild { if (uri || isImage || isMedia) { const msg = { type: "GeckoView:ContextMenu", // We don't have full zoom on Android, so using CSS coordinates // here is fine, since the CSS coordinate spaces match between the // child and parent processes. Loading @@ -200,13 +196,13 @@ export class ContentDelegateChild extends GeckoViewActorChild { null, }; this.eventDispatcher.sendRequest(msg); this.sendAsyncMessage("GeckoView:ContextMenu", msg); aEvent.preventDefault(); } break; } case "MozDOMFullscreen:Request": { this.sendAsyncMessage("GeckoView:DOMFullscreenRequest", {}); this.sendAsyncMessage("GeckoView:DOMFullscreenRequest"); break; } case "MozDOMFullscreen:Entered": Loading @@ -219,7 +215,7 @@ export class ContentDelegateChild extends GeckoViewActorChild { } // fall-through case "MozDOMFullscreen:Exit": this.sendAsyncMessage("GeckoView:DOMFullscreenExit", {}); this.sendAsyncMessage("GeckoView:DOMFullscreenExit"); break; case "DOMMetaViewportFitChanged": if (aEvent.originalTarget.ownerGlobal == this.contentWindow) { Loading @@ -241,24 +237,17 @@ export class ContentDelegateChild extends GeckoViewActorChild { this.contentWindow ); if (manifest) { this.eventDispatcher.sendRequest({ type: "GeckoView:WebAppManifest", manifest, }); this.sendAsyncMessage("GeckoView:WebAppManifest", manifest); } }); break; } case "MozFirstContentfulPaint": { this.eventDispatcher.sendRequest({ type: "GeckoView:FirstContentfulPaint", }); this.sendAsyncMessage("GeckoView:FirstContentfulPaint"); break; } case "MozPaintStatusReset": { this.eventDispatcher.sendRequest({ type: "GeckoView:PaintStatusReset", }); this.sendAsyncMessage("GeckoView:PaintStatusReset"); break; } } Loading
mobile/shared/actors/ContentDelegateParent.sys.mjs +33 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,39 @@ export class ContentDelegateParent extends GeckoViewActorParent { this.window.windowUtils.remoteFrameFullscreenChanged(this.browser); return null; } case "GeckoView:DOMMetaViewportFit": { return this.eventDispatcher.sendRequest({ viewportfit: aMsg.data, type: "GeckoView:DOMMetaViewportFit", }); } case "GeckoView:ContextMenu": { return this.eventDispatcher.sendRequest({ ...aMsg.data, type: "GeckoView:ContextMenu", }); } case "GeckoView:WebAppManifest": { return this.eventDispatcher.sendRequest({ manifest: aMsg.data, type: "GeckoView:WebAppManifest", }); } case "GeckoView:FirstContentfulPaint": { return this.eventDispatcher.sendRequest({ type: "GeckoView:FirstContentfulPaint", }); } case "GeckoView:PaintStatusReset": { return this.eventDispatcher.sendRequest({ type: "GeckoView:PaintStatusReset", }); } } return super.receiveMessage(aMsg); Loading
mobile/shared/actors/GeckoViewContentChild.sys.mjs +1 −4 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ export class GeckoViewContentChild extends GeckoViewActorChild { } actorCreated() { super.actorCreated(); this.pageShow = new Promise(resolve => { this.receivedPageShow = resolve; }); Loading Loading @@ -334,8 +332,7 @@ export class GeckoViewContentChild extends GeckoViewActorChild { aEvent.reason === "presscaret" || aEvent.reason === "releasecaret" ) { this.eventDispatcher.sendRequest({ type: "GeckoView:PinOnScreen", this.sendAsyncMessage("GeckoView:PinOnScreen", { pinned: aEvent.reason === "presscaret", }); } Loading
mobile/shared/actors/GeckoViewContentParent.sys.mjs +14 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,20 @@ export class GeckoViewContentParent extends GeckoViewActorParent { return this.sendQuery("ContainsFormData"); } async receiveMessage(aMsg) { switch (aMsg.name) { case "GeckoView:PinOnScreen": { return this.eventDispatcher.sendRequest({ ...aMsg.data, type: "GeckoView:PinOnScreen", }); } default: { return super.receiveMessage(aMsg); } } } restoreState({ history, switchId, formdata, scrolldata }) { if (Services.appinfo.sessionHistoryInParent) { const { browsingContext } = this.browser; Loading
mobile/shared/actors/GeckoViewPermissionChild.sys.mjs +3 −6 Original line number Diff line number Diff line Loading @@ -20,8 +20,7 @@ const MAPPED_TO_EXTENSION_PERMISSIONS = [ export class GeckoViewPermissionChild extends GeckoViewActorChild { getMediaPermission(aPermission) { return this.eventDispatcher.sendRequestForResult({ type: "GeckoView:MediaPermission", return this.sendQuery("GeckoView:MediaPermission", { ...aPermission, }); } Loading @@ -35,8 +34,7 @@ export class GeckoViewPermissionChild extends GeckoViewActorChild { } mediaRecordingStatusChanged(aDevices) { return this.eventDispatcher.sendRequest({ type: "GeckoView:MediaRecordingStatusChanged", return this.sendAsyncMessage("GeckoView:MediaRecordingStatusChanged", { devices: aDevices, }); } Loading Loading @@ -132,8 +130,7 @@ export class GeckoViewPermissionChild extends GeckoViewActorChild { let allowOrDeny; try { allowOrDeny = await this.eventDispatcher.sendRequestForResult({ type: "GeckoView:ContentPermission", allowOrDeny = await this.sendQuery("GeckoView:ContentPermission", { uri: principal.URI.displaySpec, thirdPartyOrigin: aRequest.principal.origin, principal: lazy.E10SUtils.serializePrincipal(principal), Loading