Style fix

This commit is contained in:
Cheng Zhao 2015-11-04 16:50:19 +08:00
parent 4013b652ff
commit 441cc3e57e

View file

@ -11,14 +11,14 @@ wrapSession = (session) ->
# session is an Event Emitter. # session is an Event Emitter.
session.__proto__ = EventEmitter.prototype session.__proto__ = EventEmitter.prototype
wrapDownloadItem = (download_item) -> wrapDownloadItem = (downloadItem) ->
# download_item is an Event Emitter. # downloadItem is an Event Emitter.
download_item.__proto__ = EventEmitter.prototype downloadItem.__proto__ = EventEmitter.prototype
# Be compatible with old APIs. # Be compatible with old APIs.
download_item.url = download_item.getUrl() downloadItem.url = downloadItem.getUrl()
download_item.filename = download_item.getFilename() downloadItem.filename = downloadItem.getFilename()
download_item.mimeType = download_item.getMimeType() downloadItem.mimeType = downloadItem.getMimeType()
download_item.hasUserGesture = download_item.hasUserGesture() downloadItem.hasUserGesture = downloadItem.hasUserGesture()
app.setApplicationMenu = (menu) -> app.setApplicationMenu = (menu) ->
require('menu').setApplicationMenu menu require('menu').setApplicationMenu menu
@ -57,7 +57,7 @@ app.setDataPath = (path) -> @setPath 'userData', path
app.resolveProxy = -> @defaultSession.resolveProxy.apply @defaultSession, arguments app.resolveProxy = -> @defaultSession.resolveProxy.apply @defaultSession, arguments
app.on 'activate', (event, hasVisibleWindows) -> @emit 'activate-with-no-open-windows' if not hasVisibleWindows app.on 'activate', (event, hasVisibleWindows) -> @emit 'activate-with-no-open-windows' if not hasVisibleWindows
# Session wrapper. # Wrappers for native classes.
sessionBindings._setWrapSession wrapSession sessionBindings._setWrapSession wrapSession
process.once 'exit', sessionBindings._clearWrapSession process.once 'exit', sessionBindings._clearWrapSession