From 158d0193716f9c157cfaa7ec72b84146dec1a181 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 1 Apr 2016 10:56:20 +0200 Subject: [PATCH] Use application-level events to control updates in the browser process --- src/application-delegate.coffee | 4 ++-- src/browser/atom-application.coffee | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/application-delegate.coffee b/src/application-delegate.coffee index 8bfae13fc..8ac6ceb5e 100644 --- a/src/application-delegate.coffee +++ b/src/application-delegate.coffee @@ -245,10 +245,10 @@ class ApplicationDelegate webFrame.setZoomLevelLimits(1, 1) checkForUpdate: -> - ipcRenderer.send('check-for-update') + ipcRenderer.send('command', 'application:check-for-update') restartAndInstallUpdate: -> - ipcRenderer.send('install-update') + ipcRenderer.send('command', 'application:install-update') getAutoUpdateManagerState: -> ipcRenderer.sendSync('get-auto-update-manager-state') diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index 772afc0e0..a579fb762 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -310,9 +310,6 @@ class AtomApplication ipcMain.on 'execute-javascript-in-dev-tools', (event, code) -> event.sender.devToolsWebContents?.executeJavaScript(code) - ipcMain.on 'check-for-update', => - @autoUpdateManager.check() - ipcMain.on 'get-auto-update-manager-state', (event) => event.returnValue = @autoUpdateManager.getState()