move session wrapper to webcontents

This commit is contained in:
deepak1556 2016-05-02 13:15:57 +05:30 committed by Kevin Sawicki
parent 609f5dcaaf
commit 14661819c2
3 changed files with 7 additions and 11 deletions

View file

@ -7,6 +7,7 @@ const Menu = require('electron').Menu
const binding = process.atomBinding('web_contents')
const debuggerBinding = process.atomBinding('debugger')
const sessionBinding = process.atomBinding('session')
let nextId = 0
@ -211,8 +212,14 @@ let wrapDebugger = function (webContentsDebugger) {
Object.setPrototypeOf(webContentsDebugger, EventEmitter.prototype)
}
var wrapSession = function (session) {
// session is an EventEmitter.
Object.setPrototypeOf(session, EventEmitter.prototype)
}
binding._setWrapWebContents(wrapWebContents)
debuggerBinding._setWrapDebugger(wrapDebugger)
sessionBinding._setWrapSession(wrapSession)
module.exports.create = function (options) {
if (options == null) {