Pass continueUpdate callback in the 'will-install-update' event.

This commit is contained in:
Cheng Zhao 2013-06-03 18:21:13 +08:00
parent a918cd6b4e
commit f435ed8667
2 changed files with 6 additions and 2 deletions

View file

@ -25,7 +25,7 @@ void AutoUpdater::WillInstallUpdate(const std::string& version,
const base::Closure& install) {
base::ListValue args;
args.AppendString(version);
bool prevent_default = Emit("will-install-update", &args);
bool prevent_default = Emit("will-install-update-raw", &args);
if (prevent_default)
continue_update_ = install;

View file

@ -3,4 +3,8 @@ EventEmitter = require('events').EventEmitter
AutoUpdater::__proto__ = EventEmitter.prototype
module.exports = new AutoUpdater
autoUpdater = new AutoUpdater
autoUpdater.on 'will-install-update-raw', (event, version) ->
@emit 'will-install-update', event, version, => @continueUpdate()
module.exports = autoUpdater