Merge branch 'master' into chrome51

This commit is contained in:
Cheng Zhao 2016-05-23 19:49:43 +09:00
commit 9f858e1243
13 changed files with 94 additions and 54 deletions

View file

@ -1,6 +1,6 @@
'use strict'
const {Menu} = require('electron')
const {deprecate, Menu, session} = require('electron')
const {EventEmitter} = require('events')
const bindings = process.atomBinding('app')
@ -41,6 +41,18 @@ if (process.platform === 'darwin') {
}
}
app.allowNTLMCredentialsForAllDomains = function (allow) {
if (!process.noDeprecations) {
deprecate.warn('app.allowNTLMCredentialsForAllDomains', 'session.allowNTLMCredentialsForDomains')
}
let domains = allow ? '*' : ''
if (!this.isReady()) {
this.commandLine.appendSwitch('auth-server-whitelist', domains)
} else {
session.defaultSession.allowNTLMCredentialsForDomains(domains)
}
}
// Routes the events to webContents.
const events = ['login', 'certificate-error', 'select-client-certificate']
for (let name of events) {