Implement window overrides in main context

This commit is contained in:
Kevin Sawicki 2017-01-11 16:36:59 -08:00
parent 95054f443f
commit 3f7b3c4bd7
13 changed files with 357 additions and 289 deletions

View file

@ -0,0 +1,22 @@
/* global binding */
'use strict'
const {guestInstanceId, hiddenPage, openerId, send, sendSync} = binding
const {parse} = JSON
const ipcRenderer = {
send (...args) {
return send('ipc-message', args)
},
sendSync (...args) {
return parse(sendSync('ipc-message-sync', args))
},
// No-ops since events aren't received
on () {},
once () {}
}
require('../renderer/window-setup')(ipcRenderer, guestInstanceId, openerId, hiddenPage)