Move session-created event to app

This follows the convention of other *-created events.
This commit is contained in:
Cheng Zhao 2016-07-12 20:06:08 +09:00
parent 45500701f1
commit d739d8772c
2 changed files with 7 additions and 10 deletions

View file

@ -1,4 +1,4 @@
const {app, ipcMain, session, webContents, BrowserWindow} = require('electron')
const {app, ipcMain, webContents, BrowserWindow} = require('electron')
const {getAllWebContents} = process.atomBinding('web_contents')
const renderProcessPreferences = process.atomBinding('render_process_preferences').forAllWebContents()
@ -333,7 +333,7 @@ app.once('ready', function () {
}
})
}
session.on('session-created', function (ses) {
app.on('session-created', function (ses) {
ses.protocol.registerBufferProtocol('chrome-extension', chromeExtensionHandler, function (error) {
if (error) {
console.error(`Unable to register chrome-extension protocol: ${error}`)