Add 'ready-for-update-on-quit' event for auto-updater.
This commit is contained in:
parent
f435ed8667
commit
a1dc4b88be
6 changed files with 51 additions and 3 deletions
|
@ -56,6 +56,20 @@ void CallNSInvocation(ScopedNSInvocation invocation) {
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (void)updater:(SUUpdater*)updater
|
||||
willInstallUpdateOnQuit:(SUAppcastItem*)update
|
||||
immediateInstallationInvocation:(NSInvocation*)invocation {
|
||||
AutoUpdaterDelegate* delegate = auto_updater::AutoUpdater::GetDelegate();
|
||||
if (!delegate)
|
||||
return;
|
||||
|
||||
std::string version(base::SysNSStringToUTF8([update versionString]));
|
||||
ScopedNSInvocation invocation_ptr([invocation retain]);
|
||||
delegate->ReadyForUpdateOnQuit(
|
||||
version,
|
||||
base::Bind(&CallNSInvocation, base::Passed(invocation_ptr.Pass())));
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
namespace auto_updater {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue