Pass continueUpdate callback in the 'will-install-update' event.
This commit is contained in:
parent
a918cd6b4e
commit
f435ed8667
2 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue