app: add will-download event to defaultSession

This commit is contained in:
Robo 2015-08-31 00:22:01 +05:30
parent 0f2ef3feb2
commit aed487ef40
5 changed files with 77 additions and 4 deletions

View file

@ -32,8 +32,10 @@ app.setAppPath = (path) ->
app.getAppPath = ->
appPath
# Be compatible with old API.
app.once 'ready', -> @emit 'finish-launching'
app.once 'ready', ->
app.defaultSession.__proto__ = EventEmitter.prototype
# Be compatible with old API.
@emit 'finish-launching'
app.terminate = app.quit
app.exit = process.exit
app.getHomeDir = -> @getPath 'home'