Merge pull request #4182 from deepak1556/debugger_api_patch

browser: add webContents.debugger api
This commit is contained in:
Cheng Zhao 2016-01-24 21:43:18 +08:00
commit e1e58b642e
9 changed files with 500 additions and 1 deletions

View file

@ -7,6 +7,7 @@ const NavigationController = require('electron').NavigationController;
const Menu = require('electron').Menu;
const binding = process.atomBinding('web_contents');
const debuggerBinding = process.atomBinding('debugger');
let slice = [].slice;
let nextId = 0;
@ -215,7 +216,14 @@ let wrapWebContents = function(webContents) {
};
};
// Wrapper for native class.
let wrapDebugger = function(webContentsDebugger) {
// debugger is an EventEmitter.
webContentsDebugger.__proto__ = EventEmitter.prototype;
};
binding._setWrapWebContents(wrapWebContents);
debuggerBinding._setWrapDebugger(wrapDebugger);
module.exports.create = function(options) {
if (options == null) {