2017-01-12 00:36:59 +00:00
|
|
|
/* global binding */
|
|
|
|
|
|
|
|
'use strict'
|
|
|
|
|
2017-01-12 21:28:48 +00:00
|
|
|
const {send, sendSync} = binding
|
2017-01-12 00:36:59 +00:00
|
|
|
|
|
|
|
const ipcRenderer = {
|
|
|
|
send (...args) {
|
|
|
|
return send('ipc-message', args)
|
|
|
|
},
|
|
|
|
|
|
|
|
sendSync (...args) {
|
2018-08-09 14:24:10 +00:00
|
|
|
return sendSync('ipc-message-sync', args)[0]
|
2017-01-12 00:36:59 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
// No-ops since events aren't received
|
|
|
|
on () {},
|
|
|
|
once () {}
|
|
|
|
}
|
|
|
|
|
2017-04-30 10:35:41 +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)
|
|
|
|
|
2017-04-30 10:35:41 +00:00
|
|
|
require('../renderer/window-setup')(ipcRenderer, guestInstanceId, openerId, hiddenPage, nativeWindowOpen)
|