2017-01-12 00:36:59 +00:00
|
|
|
'use strict'
|
|
|
|
|
2018-09-22 12:28:50 +00:00
|
|
|
/* global binding */
|
|
|
|
|
2018-09-13 16:10:51 +00:00
|
|
|
const { send, sendSync } = binding
|
2017-01-12 00:36:59 +00:00
|
|
|
|
|
|
|
const ipcRenderer = {
|
|
|
|
send (...args) {
|
2018-10-06 11:48:00 +00:00
|
|
|
return send('ipc-internal-message', args)
|
2017-01-12 00:36:59 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
sendSync (...args) {
|
2018-10-06 11:48:00 +00:00
|
|
|
return sendSync('ipc-internal-message-sync', args)[0]
|
2017-01-12 00:36:59 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
// No-ops since events aren't received
|
|
|
|
on () {},
|
|
|
|
once () {}
|
|
|
|
}
|
|
|
|
|
2018-09-13 16:10:51 +00:00
|
|
|
let { guestInstanceId, hiddenPage, openerId, nativeWindowOpen } = binding
|
2017-01-12 21:28:48 +00:00
|
|
|
if (guestInstanceId != null) guestInstanceId = parseInt(guestInstanceId)
|
|
|
|
if (openerId != null) openerId = parseInt(openerId)
|
|
|
|
|
2018-09-20 03:43:26 +00:00
|
|
|
require('@electron/internal/renderer/window-setup')(ipcRenderer, guestInstanceId, openerId, hiddenPage, nativeWindowOpen)
|